Assistance in diploma. Question programming the Arduino mega

PaulS:

Use a variable to count the number of times it's HIGH.

No. The variable needs to count the number of times the pin BECOMES high.

In the ideal world, yes, but his code has so many long delays in it (a total of 17 seconds), it won't make the slightest difference, unless he leans on the button for more than that length of time.