public static <T> Predicate<T> countingPredicate(final LongAdder counter,
                                                     final Predicate<T> predicate) {
        return countingPredicate(counter, true, predicate);
    }
Creates a predicate that increments counter for each match encountered.

@param counter   The counter to increment. It is the caller's responsibility to zero it as needed.
@param predicate The predicate to wrap
@return The wrapped predicate
stroom-util/src/main/java/stroom/util/PredicateUtil.java