Farm animals exist in such large numbers only because they're being bred to be slaughtered for meat. If the demand for meat decreases, they breed fewer animals. So the more people become plant-based, the fewer animals are bred into a life of suffering. The whole world isn't going to go vegetarian overnight, so it would be a gradual process of decreasing the number of animals that are bred to be slaughtered.