Yep, the speedometer sensor is on the output shaft of the transmission. Pulses are sent to the dash display for calculation before displaying speed and distance in either metric or imperial units. From the factory speed is 7.7% conservative (supposedly intentionally) and odometer is accurate. Changes to gearing and/or tire circumference affect readings further.
You can correct either speed or odometer with a device like 12 O'Clock Lab's SpeedoDRD, which is basically a programmable multiplier/divider that goes inline between the sensor and the display. But the 7.7% difference between speed and distance is hard-coded into the display, so both readings will never be accurate at the same time.
I have a SpeedoDRD on my WRR with 13/51 gearing and Dunlop D606 rear tire and my speedometer reads dead-on accurate at all speeds. It plugs inline into the factory wiring harness. 12 O'Clock Labs' website has a calculator to help you program it easily and quickly.