He was probably using a stepper as a generator (alternator), tied into a comparator and a counter to count the pulses.
Not a very reliable way to do it, as if the shaft were rotated very slowly, the pulse generated may be too low of an amplitude to be detected. Also, a stepper used as a sensor would add considerable inertia and drag to the shaft.