There is a magnet on the shaft of the motor. The small circuit board senses the magnet pulses with, what I suppose is, a Hall effect sensor.