If i run the program and enter some values it prints the number of values at the beginning, before the cout-command steps in. That shouldn't be like that.
On the other hand i don't rly unterstand what the if-condition, at the end of the source, expresses. It doesn't matter which values be entered - always the else-condition is running.
How many values do you enter? In the shown example you did give 7 values.
How about "42 1 7 6"? That is four values.
7 % 2 == 1, because 3*2+1 == 74 % 2 == 0, because 2*2+0 == 4
The % returns the remainder of division. If you have even number of values, then size() % 2 is 0, because all even values are multiples of 2; no remainder.
PS. your else-branch does not print newline at end, unlike the other branch.