Depending on what you mean by "keypresses", something like this could work:
Start Loop : Repeat 5 times
Wait for spoken response: '[0..9]'
Write [Blue] '{TXT:~response}' to log
Press variable key(s) [~response] and hold for 0,06 seconds and release
End Loop
which would press the keys associated with the numbers (I.E. those above the letters, not on the numpad)
If you want to use numpad keys instead, you can add this action right above the variable keypress action:
Set text [~response] to '[NUM{TXT:~response}]'
which will insert the number into the appropriate variable keypress indicator
The command will press each key as you speak the number, as otherwise the command becomes more complex in order to store and then recall that data.
Note that the "Write a Value to the Event Log" action is not required, but can be useful as feedback both that your input was recognized, and what was recognized (if you don't normally have VoiceAttack visible, this could be replaced with a "Say Something with Text-To-Speech" action, or a simple "Play a Sound" action if you only want to make sure the next number can be spoken).
This topic attempts to explain the basic principles behind actions such as the loop used in the example, and
this topic attempts to summarize the basics regarding variables and tokens.
The official documentation provides further information on the features used.