Counting pulses and using them

Or you could wait until the button hasn't been pressed for maybe 3 or 5 seconds and then store the count and start blinking.

But you have to decide. A lot of the skill in programming is working out in detail what you want to happen and when.

Steve