The unordered_multiset::count() is a built-in function in C++ STL which returns the count of elements in the unordered_multiset container which is equal to a given value.
Parameters: The function accepts a single mandatory parameter val which specifies the element whose count in the unordered_multiset container is to be returned.
Return Value: It returns an unsigned integral type which denotes the number of times a value occurs in the container.
Below programs illustrates the above function:
11 occurs 3 times 12 occurs 2 times 13 occurs 2 times 14 occurs 1 times
a occurs 3 times b occurs 2 times c occurs 2 times
- set count() function in C++ STL
- map count() function in C++ STL
- unordered_multimap count() function in C++ STL
- unordered_set count() function in C++ STL
- 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
- bitset count() in C++ STL
- unordered_map count() in C++
- multimap::count() in C++ STL
- 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.