|  | 
| template<typename I , typename S , typename R , typename P  = identity> requires input_iterator<I> && sentinel_for<S, I> && indirect_unary_predicate<R, projected<I, P>>
 | 
| constexpr iter_difference_t< I > | ranges::count_if (I first, S last, R pred, P proj=P{}) | 
|  | function template count_if
 | 
|  | 
| template<typename Rng , typename R , typename P  = identity> requires input_range<Rng> && indirect_unary_predicate<R, projected<iterator_t<Rng>, P>>
 | 
| constexpr iter_difference_t< iterator_t< Rng > > | ranges::count_if (Rng &&rng, R pred, P proj=P{}) | 
|  | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
 | 
|  |