If you wish to list it as having more living space, you can ... though realize that most buyers will still be comparing your town house to other similar townhouses without the finished space and see the finished basement and finished attic as a much smaller bonus than they would a property with that much living space as main space an unfinished basement and attic.
As for bedrooms ... check the state building code for a legal bedroom ... and, as stated below, there may be some local ordinances as well ... though I think that is more pertinent in towns with private sewer systems. (Often a septic system is approved for a certain house size ... often measured by the number of bedrooms in the house). The state definition of a bedroom is something ... like it must be at least 70 sf in size, have direct access to a common area (not a bathroom or closet) and have a direct fire exit (i.e. a window, door or opening no more than 4 ft off the ground, large enough to fit a person), Most people expect to see a closet or wardrobe in the room, but I believe it is not legally required.
If you include your finished attic and basement space in your numbers, you would be best served to indicate as much in your descriptions (# of bdrms and living space includes finished attic and basement) .... OR you can NOT include them and say (# of rm do NOT include finished attic and finished basement) ... however you wish to present it.
If you'd like professional help, of course I work in the Waltham area and would be happy to give you my professional opinion. If you're looking to sell your property, I would be happy to be of service.