A 4-digit target RPM set on a control panel dashboard (either small lightweight mounted on motor or on remote dashboard). Next, compare measured RPM to target RPM.
If measured RPM is too high then less power delivered to DC motor. If measured RPM is too low then more power delivered to DC motor.
The measured RPM can be delivered by a magnetic RPM sensor (model in hand pictured below).
PID Control is practical implementation for generic feedback loop control problems. P=Proportional deploys absolute difference between measured RPM and target RPM. I=Integral deploys cumulative sum of past differences. D=Differential deploys rate of change of differences. In general, all three deliver best control to force differences to zero achieving constant speed regardless of the cause of the deviations from constant speed.
The following hand sketch is for an LED strobe method for RPM detection (as opposed to using the Hall Effect sensor above). Preference is to use Hall Effect sensor above so this sketch is offered in case it sheds lights on implementation of the Hall Effect sensor. A YouTube example using an LED strobe presumably along lines intended by this sketch schematic.
Yet another approach is Beagle Board Blue. This board contains motor drivers and is intended for robotics apps. Not sure the difference between it and the Arduino, but both need to be configured to be a constant speed feedback loop.
For further discussion on above items please send a message.