// CPP program to count vector elements that
// match given target value.
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int> v{ 10, 30, 30, 10, 30, 30 };
int target = 30;
int res = count(v.begin(), v.end(), target);
cout << "Target: " << target << " Count : " << res << endl;
return 0;
}