The count is updated every 0.1 sec by the “add” function attached to the interrupt, regardless of the value read on pin 9. When this pin is HIGH the script updates the number display, and when it is LOW the count is “frozen” as you mentioned.
If you want to stop the count when pin 9 is LOW you need something like
if (digitalRead(machine) == HIGH) {
count++;
if (count > 9) {
count = 0;
// update seconds, minutes, …
}
}
Inside the “add” function. Only then the count will pause when pin 9 goes LOW