ok, here is what you did wrong.
EV's do not add on when a Pokemon levels up. It adds on after you you get a certain amount of them, in this case, 4.
When leveling up, you still get +(insert random number here) for a stat, but EV's are like, enhancers for that stat. EV's let you boost the stat of a Pokemon.
But in conclusion, you dont add them up when you level up, you add them up after a certain ammount of EV's.