Testing of counter using interrupts