It's not clear in the photo so I looked around and by searching for C9016 80039, I got a better picture:
Hopefully you can just make out that around the edge of the clear disc is a set of very fine graduations. I'm guessing that the sensor is therefore a beam interrupter type. If that's the case, then there may well be 4 (or 5 pins) for the sensor. Two will power the LED through one of those surface mount resistors. If there's some processing electronics inside the sensor, then there may well be 3 pins (power, gnd and signal), but if it's a dumb sensor then there may only be 2 pins.
I'm not sure I understand this. Can you not wire directly to the sensor, or do you want to keep the hacked off bit of board to help mount the sensor.
You mention Rx & Tx. If your terminology is the same as mine, then Rx (receive) & Tx (transmit) imply some sort of bi-directional communication with the sensor. I would have thought that unlikely, and it's more likely that you will get a stream of pulses coming from the sensor that correspond to the beam being interrupted by the dark strips on the edge of the clear wheel.
That then begs the question, how do you determine direction?
How many pins are there on the black blob slot sensor in your first photo?
