set_name.count(value);
#includeIn this example, we create a set container `s` and insert four elements into it. We then use the `count` function to count the occurrences of the values 20 and 50 in `s` and print the results. The `count` function is part of the C++ Standard Template Library (STL) package and is included in the `set` header file.#include using namespace std; int main() { set s; // inserting elements s.insert(10); s.insert(20); s.insert(30); s.insert(40); // counting number of elements cout << "Number of 20's in set: " << s.count(20) << endl; cout << "Number of 50's in set: " << s.count(50) << endl; return 0; }