The unordered_multimap::count() is a built-in function in C++ STL which returns the number of elements in the container whose key is equal to the key passed in the parameter.
Parameters: The function accepts a single mandatory parameter key which specifies the key whose count in the unordered_multimap container is to be returned.
Return Value: It returns an unsigned integral type which denotes the number of times a key occurs in the container.
Below programs illustrates the above function:
10 occurs 2 times 20 occurs 1 times 13 occurs 0 times 30 occurs 2 times
a occurs 2 times b occurs 1 times z occurs 0 times r occurs 2 times
- map count() function in C++ STL
- set count() function in C++ STL
- multiset count() function in C++ STL
- unordered_set count() function in C++ STL
- unordered_multiset count() function in C++ STL
- Count the number of objects using Static member function
- Function Overloading vs Function Overriding in C++
- std::count() in C++ STL
- multimap::count() in C++ STL
- bitset count() in C++ STL
- unordered_map count() in C++
- Count substrings that contain all vowels | SET 2
- Count numbers having 0 as a digit
- Count the number of 1's and 0's in a binary array using STL in C++ ?
- Count smaller elements on right side using Set in C++ STL
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.