• One of the cart’s wheels was connected to a small toothed gear.
  • Every revolution of the wheel advanced another gear by one tooth.
  • A reduction mechanism converted 400 wheel revolutions into one complete revolution of a secondary horizontal wheel.
  • That horizontal wheel contained small holes, each holding a pebble representing one Roman mile.
  • Once the mechanism completed its rotation, a pebble dropped through a small opening into a bronze collection vessel.

The Museo Galileo has a short video showing how it worked:
https://video.museogalileo.it/homo_faber/scienza/e03_02_AN1.mp4

SOURCES
https://lexundria.com/vitr/10.9/mg
https://textbookofarchitecture.com/read/vitruvius/10/9
https://mostre.museogalileo.it/homofaber/en/science/2-area-measurement/2-5-odometer.html


[image source]