Hi,
Just out of the top of my head, I think it would be most natural to implement this as another way to run macros, i.e. open a dialog and specify how many times you want to run a certain macro. In that case the user can quickly use this on any number of commands that he wants to see repeated. It might be a bit overkill to do this for cursor movement, but if you really need that feature, you can record the macro and do it that way I think.
Jeroen.