What Terri says is correct. There are often notes in the agent's portion of the MLS that give an explanation of the square footage differences between county and or city records and what is actually there. As far as illegal or against regulations the key is the term "living space." If someone says square footage, they may mean any square footage with a ceiling or roof, so that could mean, garage, basement, and or the actual home. If the term is square foot of living space it is only supposed to mean the space in the house, not the basement or garage. It is very common in Woodside, Atherton, and Portola Valley where the lots are large enough to have guest houses, 5 car garages, and barns for the mls to say 10,000 sq ft under the sq ft data and then in the agent notes say 6000 sq ft home, 750 sq foot guest house, and 3250 sq foot garage. As long as the 10K sq ft is explained they are probably ok.
City, county, and appraisal records for square footage are rarely the same, so if square footage is important to you do not rely on what you see on the mls, in an ad, or what comes out of the listing agent's mouth. While people have won law suits over square footage mistakes, that is not really a productive use of anyone's time.
Since you have been looking for a home for a while I am sure you have seen that not all agents are equal in their descriptions of properties. Since there is a lot of leeway, do your research. I realize it means kissing a lot of frogs before you find the prince, but unfortunately there are no shortcuts, unless you are using a really great agent for yourself.
Keller Williams Realty Palo Alto
Cal BRE 01191194