The clock is made of a collection of counters. Counters made by a chain of n flip-flops result in binary ripple counters capable of dividing by 2n. A four flip-flop counter naturally counts from 0 to 15. To make it count from 0 to 9, it needs some steering logic on the flip-flop toggle inputs.
I’ll show you two examples of circuits that don't use a micro but are often built with one, and explain some of the logic and theory behind these circuits.