A very common setup in idustry is very similar to what you describe, a quadrature encoder.
The encoder in a mouse is similar except for it doesnt have a 'z' pulse (one pulse each rev), but you allreready explained your gonna implent this sith a dimple and a microswitch.
The software is fairly simple, if you get pulse a before b the wheel is going one way, and b before a for t'other way, and the numer of pulses is how far the wheel has turned, you just need to impement a counter is software, simple using the incf n,F instruction n bieng the name of the register for the counter, then subtract 24 from it, if the zero flag isnt set you know the number isnt 24.
To get the thing to work you need to suss out which is the infra red led and which is the phototransistor on the encoder from the mouse, looking at the layout might tell you, the led will go to a resistor of a few hundred ohms, and the phototransistor will go to a resistor of a few k ohms.
Connect the led as you would any other to the 5v supply through a 470ohm resistor, then connect the emmiter of the phototranny to ground, connect the collector to the pic input and also to the collector a 4k7 resistor to +5, when the beam is unbroken you'll have a logic low, and a high when it is broken.
If your not sure which is which on the led try it both ways while viewing it using the camera on your 'phone, it can see infra red, once you got that working try the phototranny both ways round also while monitoring the output with a logic probe, one way will work, one not.