It's usually a worm gear on the output shaft of the transmission.
The ABS encoders, as far as I know, are only used for ABS purposes. If they're also used for determining MPH, then the ECM would need to do averaging since there are multiple encoders and they spin @ different speeds when turning.
Regardless, the point we're both making is that you have several variables that are each a functiion of both speed and fuel use in order to arrive at the final MPG number. The car is incapable of knowing fuel used/miles traveled.