The number of farmed animals is so large only because people breed them to kill them, often through artificial insemination. As more people become vegetarian, fewer farms will artificially increase the number of animals, and their population will fall.
Eventually, if everyone became vegetarian, the number of animal farms would be only a tiny fraction of what it is today.
More answers: Vegan Ethics FAQ.