step count or position of a stepper

All you need is a home position of your stepper. Unless you can find an absolute encoder, what's unlikely or expensive, the stepper has to move into home position whenever the Arduino is started. Then you can count the steps from that position.

If the exact number of steps is unimportant, you can store the current position in EEPROM, and read it from there on startup. But when powered off and on, the stepper may be off by one or more steps, that's why this method is not very reliable. And it does not remove the need for a home position detector, so that the device can be re-calibrated when needed.