Encoder_LS7366R

Hi all, Im working on a project using the counter (LS7663R) to count the pulses of an optical encoder using the sample code found here. the issue is that the counter keeps increasing regard less the rotation direction. Im new to Arduino and programming in general, could you please help me with it? bests.

Maybe a bad connection? What encoders are you using?

Thanks John, yes it was a bad connection. problem solved.