Apply fundamental counting principle (#714)