Making GetCount() method more flexible in terms of the predicate passed.