Quadrature Encoder Disc- A,B and Z

I have a quadrature encoder with a .9° 3d motor which is connected to a micro stepper ( ST-4045-A1which is similar to TB-6600 and its control by an Arduino Mega. The total count for A and B should be reading 11520. The count is 2880 for a rising edge pulse. So, for A+, A-, B+, B- I should be reading ( 2880 x 4 ) 11520 total counts. This motor is:
Motor High Precision 39.8mm(1.57in.) 0.9degree Smooth Quiet Stepping Motor (Model MS17HA2P4040)
This is the Encoder specs
0.9 degrees/step x 400 steps/revolution = 360 degrees/revolution so 4 x 400 = 1600 StepsPerRevolution.
I'm new at this so please be patient with me. I had a friend help me out on this but kind of stuck on this one. So for now, I'm only concentrating on the A pulse and trying to get the count to 2880. My problem is it's very erratic and counts to 8500 - 12000 or so. I have a pullup resistor for the interrupt (1Kohm). I also put a scope on the A pulse and don't see much of a noise which I first thought would be the issue. Ultimately I would like the program to read the counts on the A+, A-, B+, B- and Z for the Index pulse. I have the code and commented out the B and Z for now. I appreciate any help with this project.
Thank You,

For help, please read and follow the instructions in the "How to use this forum" post, at the top of every forum topic.

Please use code tags to post code.