Assuming the following circuits have been implemented:
A counter circuit that counts from 1 to 9.
A seven-segment display decoder circuit.
A digit controller which generates an signal to 7-segment display.
By making a slight modification to the previous project, you can replace the manual AN signal input with an AN controller circuit.
Let the seven-segment display generate numbers 1 through 9 in a loop. The number of digits on the seven-segment display can be controlled through AN-controller.