The 4017 is an IC that is able to count up to ten. It has 10 outputs that will each go HIGH (turn on) in sequence. The count advances whenever a pulse comes in to the clock pin. The output (pin3) of a 555 Timer in astable mode works really well as a clock for the 4017.
How to Use It?
Below is an example that shows how to count to a certain number (from 0 to 2 in this case). Note that the reset pin is connected to OUTPUT 3 (pin 7).
You can keep adding more LEDs to the outputs if you want to count to a higher number. We are blinking LEDs, but you could also control other things with a transistor.