ELI5: How do car speedometers work?

r/

Title. I read that there’s some mechanism with a string attached to the gearbox which measures the rotations, but that means if i suspend a car in midair and rev it the speedometer should go up? as it measures only the rotation of the gearbox. please help me understand this concept!