4 bit Counter wired as a decade Counter by ANDing the 8 (D) and 2 (B)Outputs of the counter and feeding the output from the AND gate to the reset input of the counter. This is then decoded into 10 individual Outputs representing each state of the counter from O to 9.
Similair to the funtioning of the 4017B decade Counter.