If you can attach a slotted wheel on the shaft, it is easy to use an optointerrupter to count pulses. These have an LED and photodiode or phototransistor to detect the slot.
If you can attach a slotted wheel on the shaft, it is easy to use an optointerrupter to count pulses. These have an LED and photodiode or phototransistor to detect the slot.