makes the photo eye into a counter... like an encoder