cpp/experimental/ranges/algorithm/count

Returns the number of elements in the range satisfying specific criteria. @1@ counts the elements whose projected values are equal to (i.e., ). @3@ counts the elements whose projected values satisfy the predicate (i.e., ). @2,4@ Same as, but uses as the source range, as if using  as  and  as.

Return value
number of elements satisfying the condition.

Complexity
exactly -  comparisons / applications of the predicate, and the same number of applications of the projection.