Count every time an output turns on and store it in a register.

Advertising from our partners