Thanks for all the replies so far!
Ok honestly the application would be for an ebike with a 20mph speed limit. There are simple ways around the limiter, but none would keep accurate track of mileage. As you pedal a magnet passes a pickup, when it exceeds a certain rpm there is a motor cut. My idea would limit the pulse rate to just below the cut, lets say 19mph, but keep track of how many pulses happen while you are exceeding 19mph, and when you slow down below 19mph it would continue making pulses until it is caught up, then drop back down down to the current speed you are at. Does that make more sense? Since it is "pedal assist" it would not keep the motor running while the mileage is catching up, the controller would see it as you just cruising at 19mph with no torque on the pedals.
I'm good with electronics, I have a scope and I can figure out the voltages for input and output, but I have no idea how to program, or what the Arduino capabilities are. I think a Raspberry Pi would be physically too big and complicated. This would need to be small and lightweight and simple.
I was pedaling to jump a flight of stairs last weekend, and right as I approach it the stupid 20mph limiter kicks in and almost made me eat it. LOL Its so lame, I can easily go over 20mph on a pedal bike with no motor, so why does my ebike need to limit me? I can decide what is a safe speed, just like when I'm driving a car that has no speed limiter!