If you want to write a simple counter , can use johson counter, The johsom counter is simple and use less cell than other counters. and you can use johson counter out to generate some logical for other circiu.
A Johnson counter is a special case of shift register, where the output from the last stage is inverted and fed back as input to the first stage. A pattern of bits equal in length to the shift register thus circulates indefinitely. These counters are sometimes called "walking ring" counters, and find specialist applications, including those similar to the decade counter, digital to analogue conversion, etc.