Such sensors are made by nearly every control maker. A typical arrangement has you add a small wheel to the shaft. Part of this wheel has a magnet. The wheel, and the magnet, rotate through a piece that senses the magnet each time it passes.