Hi Hugo. Each brand of car manufacturer does things in slightly different ways, but in general there is usually a pulse stream available that connects to the dash board electronics somewhere. The pulses are typically at a variable frequency proportional to the speed of the car and can be integrated to find the distance. The frequency is usually in the audio range, so is easy to interface to.
I'm not an expert, but recently I witnessed some friends hooking up a rally trip computer to a Subaru and it was actually quite easy. The difficult part is finding some auto enthusiasts who have already found the necessary pulse stream wire in the brand of car you want to work with. Try googling for "rally computer odometer interface" or similar subjects and perhaps have a look at rally enthusiast forums.