It depends. Some cities allow chickens, and some don't. Some have a limit on the number of chickens, and some allow unlimited numbers of birds. Many do have a regulation that specifies "no roosters," and many require that the chickens' pen be a set number of feet from neighboring residences.
The best way to find out the rules and regulations for your city is to look up your city code online or call the city offices. If you live outside city or town limits, call your county.
If you do keep chickens in the city or suburbs, read these helpful tips on how to do so without annoying your neighbors!