Counter to my code (Dead Man Switch)

Create a Boolean variable called remember20, or whatever you like. Initialize it to false. Then:

if(value > 20) remember20 = true;

Now use remember20 to enable the counter.