You are looking for accurate distance measurement. Almost all stationary bikes, either traditional or spinners (more like an outdoor upright bicycle, but with an awkward method of determining resistance -- which would be a combo of elevation and wind resistance) will tell you distance. The calculation is probably very particular to your model of bike or recumbent cyle.
If you wish to measure everything yourself, it's going to be very difficult unless you take your bike apart, revealing the size of the pulley wheel, which is often restrained by a very small wheel that is actually a brake, and all are connected to computer wires that go straight to the bike console.
The bike connects wires to all of this and if you're lucky, they go to a male port which will allow you to plug it into the upcoming (2017) Wahoo "retrofit" device which will upload to an app, and you can then import the data into your favorite fitness app. This will likely give riders more accurate information. Or that's the idea, anyway. But do be careful: I have a 9-10 year old stationary bike that still works well. I don't want break anything.
But, if what you mainly want is a speed sensor, they are available from Garmin, Polar, Wahoo, and many others. They generally need cadence information to work most accurately. Cadence sensors are cheap and can attach to your shoe! Very easy. The speed sensor needs your wheel circumference because cadence is not the same thing as speed - a speed sensor, in concert with other information, will literally tell you your distance - how far you've traveled..It may be in your manual and if not, you can take one of the plastic shields off your traditional exercise bike and try to attach it. It probably won't fit. You might be able to attach it to the front spinner wheel, but that won't be easy because it's so thin: you need a hub, as on an outdoor bike. This combo will give you fairly accurate distance information. Most bikes have a console that does this for you, but the accuracy of dedicated sensors is much better. That's well-known. I have to use the bike console for mph, and I am unsatisfied with its accuracy. Also, w/out a wattage meter, calorie count is usually way off: I let my app tell me. It's based on something called "Corrected Mets" and it's generally considered accurate.
The trouble is that all these sensors may be expensive for most people at home, as are aftermarket wattage meters. Gyms will have all of this technology, but not the convenience of having your own equipment.
Getting a single revolution is a difficult task for any indoor bike, and not even a lot of fun on an outdoor bike. But if you need this information, you can pull it out.