allow count to work when a predicate is passed to limit the results