Not sure were you searched but this is very basic but important stuff. You need to understand the difference between variables and string literals and how the difference impacts their usage. You can use some combination of a string literal and a variable to get what you want but you need to adhere to the language syntax rules for the respective elements.
Use a string literal as a parameter in combination with variable substitution:
numberofupkeystrokes = 10
SendKey('{UP %numberofupkeystrokes%}')
Or construct a string literal using a variable and concatenation:
numberofupkeystrokes = 10
SendKey('{UP ':numberofupkeystrokes:'}')
Another alternative would be to fill the contents of a variable with your keystroke string:
numberofupkeystrokes = 10
strKeys = '{UP ':numberofupkeystrokes:'}'
SendKey(strKeys)
You can find more information about string concatenation, variable substitution, string literals, and variables in the Consolidated WIL Help file.