Maximum amount of vitamins you can use are 10.
They will not effect your Pokemon's EVs negatively. A Pokemon can have 510 EVs maximum, though in effect it's 508 (since every 4 EVs is a stat boost, 508 is the closest number divisible by 4). Using vitamins will increase your Pokemon EVs the same way training it will, but there's just a limit on how many you can feed a Pokemon (10 for any stat).
Vitamins are a faster way of EV training, since you can add 100 EVs to any stat without having to fight wild Pokemon.