Input: green rocking lever driven by any motion source (violet cam and brown follower in this video). Two orange pawls are fixed together and have revolute joints with the green lever. They are forced toward their ratchet wheels by springs (not shown).
When blue ratchet wheel, to which unit digit dial is attached, completes 1 revolution, yellow ratchet wheel, to which ten digit dial is attached, turns 1/10 of a revolution. This happens because:
1. Distance from the pawl point to ratchet wheel axis for the right pawl is smaller than the one for the left pawl.
2. One tooth on the ratchetwheels is cut deeper than the remaining teeth.
The video shows counting process from 07 to 21.
Measure for positioning the ratchets and digit dials is not shown.