Just complementing what Pally and Vampire said:
There is a total of 10 controllable, living beings (which includes Sims, dogs, cats, horses and unicorns) allowed. Out of those 10, a maximum of 8 can be Sims, and a maximum of 6 can be pets, albeit not both at the same time, as that would exceed the limit of 10.
The pets' frames will be shown as a second vertical branch, to the right of the Sims' vertical bar.
Smaller pets such as rodents, snakes, birds and lizards do not count for the limited number.