Here's the link to the codes for La Habra, CA:
http://qcode.us/codes/lahabra/view.php?topic=6-6_22&frames=on
I also inquired at the city office. The guy who looked it up for me said that it'd be okay. Based on my conversation with the guy and my reading and interpretation of the codes (not legal expert), it's fine to keep chickens without a permit so long as you don't intend them for game or consumption, or they'd definitely be defined as fowl rather than pet birds. The other thing is that the restrictions on coop location basically means no legal chicken keeping for most people not zone in agricultural areas.
In short summary: yes to chickens as pets; no specification on roosters (but there is a clause on disturbing the peace); max of 20 birds; coops to be 50ft from any dwelling and 10ft from property line
Here are the relevant code sections:
6.04.040 Bird.
“Bird” means any bird of any age of either sex, including any fowl, exotic or domestic bird. (Ord. 1627 § 1, 2003)
6.04.080 Fowl.
“Fowl” means a bird usually raised for consumption. In this environment a fowl could include but is not limited to chicken, duck, goose, turkey, pigeon, quail, or pheasant. (Ord. 1627 § 1, 2003)
6.22.300 Permit required to keep fowl.
No person shall keep any fowl as defined in Section 6.02.100 of this title, within the city limits, except in the agricultural zone or open space declared area, without first securing a permit from the animal control officer as prescribed in Chapter 6.30 of this title. The fee for this permit shall be as established per resolution of the city council. This section shall not apply to those animals that are being kept upon the premises of a public school in association with an agriculture education program. (Ord. 1627 § 1, 2003)
6.22.310 Birds.
A. No person or persons, firm or corporation shall keep or maintain or cause to be kept or maintained within the city any canary, parrot, parakeet, macaw, or fowl as defined in Section 6.02.100 of this title, any bird of prey, or other bird, except under the following conditions:
1. No person shall raise, keep or have in his possession in the city, except within a rural zone or open space declared area, any live adult fowl or any other bird which because of its size, natural disposition, or any other characteristic constitutes a hazard or menace to persons or disturbs the peace.
2. Permitted birds shall be confined within a suitable house, cage, coop, or aviary after sundown.
3. Such bird house, cage, coop, aviary, or area where birds reside shall at all times be maintained in a clean and sanitary condition, shall be cleaned once a week or more often if necessary, and shall be free from offensive odors and insects.
4. Such bird house, cage, or coop shall be well lime-washed or painted once a year, or more often if necessary.
5. No part of any such bird house, cage, coop or aviary shall be less than fifty feet from any adjacent dwelling or place of business occupied by human beings for dwelling or business purposes.
6. No person shall keep or maintain any bird house, cage, coop or runway within ten feet of any property line of the lot or parcel of land upon which it is situated.
7. No person shall keep or maintain in the city, more than twenty mature birds.
B. The provisions of subsection (A) of this section shall not apply to those persons who maintain no more than four adult canaries, parakeets, parrots, doves or other similar birds that are customarily housed within a residence. (Ord. 1627 § 1, 2003)