Oh, measuring cadence is simple: Find a nice silent road where you can ride for a minute undisturbed, take some kind of clock that shows seconds, and then simply start counting when the seconds reach some set number (00 is perfect, but I find that 10, 20, etc. do just as well). Stop counting when that set number is reached again, and the number where you stopped counting is your RPM.
This works for counting heart rate (at rest, not on bike; most people can't easily count that fast) just as well as counting pedal strokes, and is precise to a single beat/stroke. You just need to be able to count while you have the second count in your sight.
A better alternative would be some app that plays a click exactly once a minute. Put that on your earphones, start counting on one click, stop counting on the next click. The advantage is that it leaves your sight unhindered, allowing you to do it with a low amount of traffic.
For counting cadence, it's advisable to count double strokes. That cuts the counting speed in half, and if you remember your pedal position on start/end, you can deduce the half-stroke count exactly.