Incremental encoder counter

Post the schematic as you wired it. Perhaps there is a simple wiring error.