understanding attachinterrupt in a pulse counter

mechengncl:
as the loop is running so quickly then I assume it must get to the point where the count = 0 is set before the ISR is triggered again

NO.

This line of code prevents that from happening

 if (millis() - lastRead >= interval)

The code inside that IF clause will only be activated once every 100 millisecs even though loop() might have repeated a 100 times in that period.

A good way to figure out how a computer program works is to get a pencil and paper and work through the program line by line writing down the results of each line as you go - using your brain as the microprocessor.

...R