How to make a binary counter
To divide a square wave frequency in half, the classic approach is to use a D flip-flop, such as a CMOS CD4013. Connect the input square wave to the clock input of the flip-flop, and connect the \$\overline{Q}\$ output back to the \$D\$ input. The output signal should be taken from the \$Q\$ output of the flip-flop.