411 REFERENCE · Wikibooks
C++ Language/Std/Stl/Algorithms/Querying/Counting
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
A sorted collection has a built-in mapciVar.count('i') member function that is most efficient.
But for a sequence collection, you need to use the count() algorithm.
Additional information about counting algorithms (includes interactive examples)