That is known as dead reckoning and is a lot less successful than you might hope. The thing is that every time you start and stop your motor their is an acceleration up to the working speed, and it is hard to account for this. Also changing direction introduces hysteresis in the gears.