This is all quite well explained on the Minecraft Wiki "Spawning" page.
Approximately one in ten newly generated chunks will contain mobs
Mobs are broadly divided into four categories [...]
Mob caps are directly proportional to the total number of chunks eligible for spawning. To calculate the cap, the spawning area is expanded by one chunk in every direction (so the default gives 17×17 chunks), then the total number of chunks is plugged into the following formula:
cap = constant * chunks / 256
Each mob category has a separate cap and a different constant in the formula:
Passive = 10
In single player mode, the chunk count is 17×17 = 289, and the caps work out to:
Passive = 11
Finally, which passive mob pack is spawned at chunk generation and later (if the cap isn't full) is random, and they all have equal probability. The exception is horses (and donkeys and mules), which have zero possibility of spawning outside of the plains biome.
So, consequently, there is a limit of 11 passive mobs per 17x17 chunk area around the player (in singleplayer). This is the limit that prevents more mob packs from spawning though, so you can actually get slightly over the limit. For example, if the 17x17 area already has 10 passive mobs, a new mob pack will spawn soon. If that mob pack spawns a larger number of animals (say, 5), then you would have 15 animals in that 17x17 chunk area. This pushes the count over the cap, so passive animal spawning is now disabled until the cap falls or you move far enough away that there are fewer animals in the 17x17 chunk area around you.