The code sets limits on the number of outlets that can be connected to a single circuit, which will vary somewhat with the construction of the house. It mandates at least one outlet or light fixture for every 575 square feet of space in a house. Outlets along the bottom of a wall must be within 5 1/2 feet of the floor and any point along the wall must be within 6 feet of an outlet, not counting doorways and other spaces. This is to cut down on use of extension cords.
Outdoor outlets, those in a bathroom or other area within 6 feet of a sink and all kitchen countertop outlets must be ground fault circuit interrupters, or GFCIs. GFCI outlets are sort of minicircuit breakers, wired so if the circuit is interrupted or shorted, a switch within that outlet will trip to shut off power. GFCI outlets wired in a circuit will disable all outlets on the circuit if one trips.
Built-in appliances such as air conditioners, dishwashers, ovens, cooktops, etc., each must be on a separate circuit. They cannot be connected to circuits with other appliances, lights or outlets. Laundry outlets require a separate 20-amp circuit and electric dryers must have a separate 240-volt circuit. Kitchens must have at least two separate 20-amp circuits not supplying lights or other outlets in the house. Countertop outlets normally should be fed by both kitchen circuits.
Every habitable room, hallway or other space must have a switch to control lighting in that area, either a permanently installed fixture or a lamp plugged into an outlet. A light switch in kitchens and bathrooms must control a permanently installed light, like an overhead fixture.
Licensed electricians in all states are trained in the NEC and must follow its rules in new construction, remodeling or repair. Consult a licensed electrician for any questions or concerns with electrical codes or installations.