Technical notes
Interrupt-based event capture
A polling loop only sees an input when execution reaches the read operation. Interrupt driven counting gives the input event its own response path instead of tying observation to the loop schedule.
Counter operation
The module accumulates incoming signal events into a count used by the application.
Capture and reporting timing
The useful distinction is between capturing an event and reporting the result. Output or communication activity should not determine when the system notices the next input transition.