measure rpm of stepper motor

You tell a stepper motor to step.
So you know when the steps take place.
And you know how may steps per revolution your motor has.

The rest is math, right?