How to read an encoder and control a stepper motor without delay()

If the stepper and encoder are hooked to the same thing, do you even need the encoder? All it's going to tell you is how far the motor turned, but since it's a stepper motor you should know that anyway just by counting the steps.

Telling the stepper to step, and having it actually step, are two different things. The encoder tells you whether it actually stepped.