The speedometer gear is located on the output shaft. Inspect it for damage.
This gear rarely suffers damage because the gear from the speedometer that meshes with it is usually made of a softer material. Sometimes, the speedometer gear on the mainshaft is replaceable. A clip can hold it in place or it can be a pressed fit. A special puller is available to pull these gears on the car.