SACRAMENTO, Calif. (KTXL) — Dog and cat lovers in Sacramento may sometimes want more than one pet, but there is a limit to how many a resident of the city is allowed to have, according to city code.

There is a 10-pet limit when it comes to cats and dogs. However, that limit is broken down into a maximum of three dogs and seven cats.

-Video Above: Hot air balloon crashes into car

Dogs over the age of 4 months count toward the limit, and for cats, they are counted if they are over 2 months. That limit applies to each household within city limits.

When it comes to the three-dog limit, potbellied pigs, which are legal to own in Sacramento, count toward the limit. So, a Sacramento resident would only be allowed two dogs and one potbellied big, or vice versa.

Pet owners will need to have licenses for all their pets, according to the city. If the dog or cat is older than 4 months, they will need to have a license.

“A license authorizes a person to own, harbor, and keep a dog or cat within the city limits of Sacramento,” the city says.

The cost of a license ranges from $20 to $205, depending if it’s for a cat or dog, if the pet is spayed/neutered, and if it’s for one year or more. There is a discount for those over the age of 62, but the pet must be spayed or neutered.

Residents within city limits who are enrolled in either Lifeline (AT&T), PG&E and SMUD assistance programs or the City Utility rate assistance program and have their pet spayed or neutered can get a one-year license for free.

The city says licensing your pet is “one of the most important steps you can take to protect your pet in case he or she becomes lost.”

According to the city, the money gained through licensing fees goes to fund the Front Street Animal Shelter.