If your speedometer has stopped working the first place to check is in the foot or lower unit of a outboard or a sterndrive. In the very front of the foot is a small hole that water goes into and runs up a small rubber line that runs all the way to the gauge. A lot of times a piece of debris can get lodged in the tiny hole and stop the flow of water therefore causing the speedometer not to read. The remedy for this is to clean the hole out until you see all the debris, or some water comes out of the pick-up hole. You can also test the speedometer with an air compressor and a blow gun. Once all the debris is out, try and blow some air through the hole and see if the speedometer moves. If it does, then you have removed all the debris out of the pick up
Most speedometer tubes separate at a coupler right at the foot/lower unit to change the impeller in an outboard. If there is no debris and you can access this coupler separate the two hoses and blow air from the upper hose to the speedometer. If it works then blow air back through the foot from the tube side and see if any debris or water comes out, if so then reattach the coupler and retest. This should have cleared all the debris.