If you have a bike with a cable, then disconnect it from the wheel, and hook it up to a high speed drill (as indicated earlier). Place the drill in reverse, and let it go. Do the math, on how many miles you have, as to how long you'll need to run the drill. 5000 miles off, per 50 hours run at 100Mph backwards, and, that is if the odometer allows for backward movement. Otherwise, you would need to take it apart and set it back.
There are other options, buy a NEW one? Buy a used one with less miles (maybe run THAT backward). Still, if you just replaced the motor, then you have the transmission with the original miles on it, right? That would not be cool. If you have the papers that show you replaced the engine at so many miles, it is not really necessary to reset the odometer. IF you replaced the Transmission and motor as one piece with 0 miles, then you still have the chassis and what not with the original miles.
Either way, keep the paper-work and you can prove what ya did. I see motors for sale on Ebay now and then, with the transmission (are they all one piece?).