On the first, coarse-grained pass, we measure only the presence or absence of our problem. That is, if one parse tree has zero occurrences of the problem and the other has a non-zero number of occurrences of the problem (as measured by our counting property), then we'll prefer the one with zero occurrences. If both have no occurrences, or both have a non-zero number of occurrences, we'll consider the two equivalent for the first pass, since we only care about the presence or absence of the problem.
On the second, fine-grained pass, we measure the actual number of occurrences of the problem, and choose the parse tree with the lower number.
CommandRankingByProblem : CommandRankingCriterion