counter

And if you want it to reset to 0 after 30 seconds, you'll need another if statement at the end doing that.