How do you increase an integer one every second and restart at zero each time either of the W,A,S,D keys are pressed.
Use timers
https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseTimers/Blueprints/index.html
Alternativlu you can add up Delta time on tick to soem varable