It seems like an odd request is it college work?
Does it have to be synchronous or will a ripple counter do?
Do you have to drive a 7 segment display or is binary fine?
If it's binary use a two bit binary counter and logic gates to fix the output, as mentioned above.
Hint: It can be done with three NAND gates enabling you to use a single IC.
If you need to drive a 7 segment display, you can get an IC to do it for you.