OPTICAL ENCODER

I have found this optical encoder that is meant to be for a stepper motor that has 0.018 step angle, but my problem is that the encoder says it has 300 counts per rotation which would be around a count every 1.2 degrees.

How can it keep up with the 0.018 movement of the stepper motor? Or does 300 counts per revolution of the encoder mean something different?

Steppers and encoders are separate, independent devices (unless connected together), and the relationship between the steps/revolution of a stepper motor and the counts/revolution of an encoder is largely irrelevant.

If the stepper is used properly, it won't slip and an encoder is not needed.

Thanks, we are trying to control to position

For position, you can count motor steps, or encoder steps.