The counter is reset when it reaches 1010 binary; hex A. The NOR gate acts as an AND gate with inverted inputs. The latch* loaded on the falling edge of the clock makes sure the counter's output is stable before it is displayed. It hides the brief moment when the counter's output is 1010.
*: EveryCircuit's counter can also be a latch.
... Then I learned I could have used just one AND gate on the B and D lines. :) I'm not 100% sure about that, though.