
Patrick B. answered 09/30/20
Math and computer tutor/teacher
Because the size of the an integer is 4 bytes, which is what you are printing out
in the very last statement before the return:
cout<<sizeof(count) <<endl;
If you are trying to find the # of elements in the vector, just use the size() method:
vec.size();