Count and use the same time

Am I correct to think that your existing program measures the time that a button is pressed and then uses that for the blink interval?

If you want to count button presses then you need code to make sure the button is released and pressed again - assuming the buttonValue shows LOW when pressed then the count would increment every time the buttonValue is LOW and previousButtonValue is HIGH

Do you also want the existing system to work alongside the counting system? If so that might be complicated.

...R