It depends on how much space you have. Animals need room to roam. But you have to experiment to see how many can comfortably reside in the space you've given them. They will tell you if they're crowded!
I've got max expansions, but trying to keep them indoors on my 2nd floor to stay out of the way of my yard resources, will let you know how many I can keep.
I expanded my backyard and front yard to the max (except my house). I can keep 25 piggies in the backyard and 35 piggies in the front yard comfortably with no other animals.