Record signal when two items touch each other
An IR Diode and IR Transistor pair would work well. Make or break the line of sight, and your microcontroller or other input method can talk to the computer.

Drill a small hole on each side, and adjust it so that when the center plastic gets pushed down, the signal breaks. That's a count.