When you create the variable set it to 0 or you can set it to any number.
When an action happens you want the variable changed set it to that number.
When an action occurs you want to reset the variable just use the variable command and set it to zero.