Even though OP accepted the existing answer this feels incomplete to me.
First, the answer has a well-considered warning about remapping
g but there
is no mention of
<count>gg as a near-synonym for
<count>G. (They differ only when the count is omitted. By default
gg goes to the first line and
G to the last.). Perhaps entering 5gg is less annoying to OP than 5 Shift+G and we have a nice, easy workaround...
The other thing that feels unaddressed is the subject of the question which is notably more generic than what has actually been discussed. It happens to be a good question, about applying a repeat count to a mapped command, but folks who come here from google will have to keep looking if it's not answered. So...
From Normal mode, if one precedes a command with a count and that command enters a vimscript/ex context we can retrieve the count from that context with the built-in variable
I'll use it in an example applicable to the more specific question we've been addressing...
nnoremap XX :<C-U>exe 'norm! ' . v:count . 'G'<CR>
In place of
XX choose any key or keys you like better than Shift+G and this will
give you a replacement for
FYI about the use of
:h c_CTRL-U): this is required to clear the command line before the mapped command is applied. Normally when we enter a number followed by
: the command line is pre-populated with a line range. In this case we don't want that.