N20 Motor Rotary Encoder Counting Problem

You need to post a link to the datasheet for your encoder and also post the program you are using.

...R

PS ... please post your program using the code button </>

so it looks like this

. See How to use the Forum. It makes it much easier for people to help you