You loop should work, but there is no connection between it and your callbacks. It loops through and then leaves Trial set to a value of 8. If you want Trial to update each time a key is pressed then increment it in your keyboard callback function.
Code:
Trial = 0
def onKeyDown(key):
global Trial
Trial += 1
viz.callback(viz.KEYDOWN_EVENT, onKeyDown)