A simple 4-bit counter consists of four D flip-flops, as shown below.
The result is presented in the binary system, where Q0 is the least significant bit and Q3 the highest. The counter starts at (0000) and adds a 1 to the number stored with each clock signal Clk...
The counter counts up to 15 (1111). At the next clock cycle the counter wants to display the number 16 (10000). The highest bit is omitted and the counter starts again at 0 (0000).
This is only one possible configuration. You you can also build the counter using JK- or T flip-flops. Also, there are counters in many different designs, they count forward, backward or in arbitrary number sequences.
In the next experiment you build the counter shown above.