General help

I am trying to create an int variable or array that records how many times the program has run in between the LED coming on and a button being pressed.

The program only runs once. The loop() function iterates many, many times.

I can't imagine that the number of iterations is at all important. You MIGHT be interested in the time between the LED coming on and the switch being pressed.

Creating an int variable is trivial:

int heresOne;

Valuing it is trivial.

   heresOne = 42;

Valuing it with meaningful data is a far different story. It is NOT at all clear what you want to store in the variable.