This varies slightly according to geography. I am not in NY, so please factor a margin for that in this answer.
Square feet would include everything above grade, and not a basement or attic. It would include hallways and bathrooms on the main floor. An appraiser generally measures the exterior of the main floor of the house as his/her starting point in determining square footage.
In some MLSs, a bedroom in a finished basement may not be counted in the total bedroom count. In other MLSs. such could be counted. I have heard of areas where finished basements that had a full walk-out could be included in the square footage for MLS purposes.
In NJ, many of our listings are absent a square footage count, because many of our homes are older. If the square footage is available from the tax assessor, agents will input that number. Calculaitons can vary slightly and for that reason, many agents will not provide a total square footage, but provide each individual room measurement.
An attic which has been completely finished for living space with permits can be counted as living space and included in the total square footage.