On the transmission, check the self help section of the forum for your model.
*Speed Sensor Pickup Problem Symptoms
Before you go any further, check to see if your bike has a cable drive speedometer that drives off the front wheel. Many have posted questions and not said if they have cable drive or electronic speedometers that drive off magnetic impulse from the transmissions.
If your speedometer stops registering speed and your odometer does not move as far as registering miles traveled, you also realize that your directional signals do not self cancel, your engine could be running differently and stalling, your problem is more than likely the VSS (vehicle speed sensor) on the transmission. It collects metal particles that are from the wear in the transmission being that it is a magnetic pickup that reads off the 4 th gear cog in the transmission. You can clean it off then replace it, but most times it will go bad again real soon. The best thing to do is replace it. I believe the cost is around $50. A simple repair requiring one bolt for removal. It's located on the transmission just behind the rear pipe. A good quality gear lube will just about eliminate this problem.
The magnetic speed sensor pick up gets fouled from the metal shavings in the transmission which causes the speedo to stop working and the directionals to stop self canceling because of no input to the ECM from the sensor. The ECM thinks that the bike is standing still because of no input. It will also set a code which gives you a red light on the dash.
Use of a good gear oil will almost eliminate this problem completely.
The sensor pickup is a bit more hidden on the later 07- model bikes under the starter.
To the right of the VSS is the Neutral safety switch with the two plugs on it and to the left is the main battery ground connection if you ever need to clean it.