counter in cpp code example
Example: count method in cpp
// my linkedin : https://www.linkedin.com/in/vaalarivan-prasanna-3a07bb203/
vector<int> vec = {1, 2, 1, 1};
cout << count(vec.begin(), vec.end(), 1);
// 3 is printed as 1 occurs thrice in the vector