N20 Motor Rotary Encoder Counting Problem

UKHeliBob:
Please post your code and a circuit diagram. A photograph of a hand drawn circuit will suffice.

Seems like a pretty straight forward and reasonable request.