The circuit on this page is for a simple light detector circuit board that has 8 detectors that can be used with visible or infrared light systems. The detectors use LM339 voltage comparators as the active element.
An optical encoder measures how far something has moved, optically. It does this by looking at a pattern of alternating black-and-white, and counting number of transitions.