The easiest way is to use some form of encoder to read the rotation. If all you are doing is measuring RPM, a single hole with an emitter/detector would be enough. Every time the hole comes around, count the "tick". X number of "ticks" per time frame will give you enough information to calculate RPM.
If the motor has a "Flat" on the shaft, one thing I've done is to use a proximity detector positioned by the flat of the shaft. It would be close enough to detect the round and miss the flat so I got my "tick" that way.