The flip-flops are logical & sequential circuits so that you can build witn them a good counter. There are J-K flip-flop, T-flip-flop, D flip-flop, and SR flip-flop.
Step 1: JK-Flip-Flop
About JK-flip-flop, I will be showing its symbol, state table, and plots of work.
Step 2: T-Flip-Flop
T-Flop-flop can be made with a JK-flip-flop joining its inputs J & K. Because I have already used it, I realized it works very well.
Step 3: D-Flip-Flop
D-flip-flop is a sequential circuit and digital too and that you can use for building counters. Also observe how to make D-flip-flop from an S-R flip-flop.
Step 4: SR-Flip-Flop
SR-flip-flop shows its symbol and state table. You can build a D-flip-flop from a SR-flip-flop.