Running stepper motor for specified no. of turns with Arduino?
Here's a post that will get you started.  It uses a Teensy 3.5, but the motor driver code will be the same. You will also need to modify the low-level driver functions to match with the actual motor driver module being used.  However, if you use a Teensy 3.5 and the L298N motor driver, you should be able to use the program with little or no modifications.