measure rpm of stepper motor

Sounds like you actually mean a DC motor and not a stepper motor.