Counter to my code (Dead Man Switch)

What makes the counter count?