There is no way of knowing where the stepper motor when you start your system unless you also have some kind of sensor.
Commonly with stepper motors you have one or two end stops/limit switches that define one or both ends of the movement. These can be mechanical switches, optical sensors, hall effect sensors or other types of switches. When you start your machine you drive the motor until you reach your switch, you have then “homed” your machine and have a zero position from where you can count steps.
A more fancy and expensive option is to have an absolute encoder which let’s you read the position of either your motor or the moving part at any time.