A list of links to assessor's offices and deed registries in Massachusetts may be found below. Unfortunately, it is not always possible to search property records by zoning classification. For instance: Cambridge's property database allows such a search; Boston's does not. In order to discover how many commercial properties are in a particular county, you may have to contact the Registrar of Deeds in that county to see if such a breakdown is available. Similarly, you may have to contact the Assessor's Offices of the various cities and towns for the number of commercial properties that they tax.
One wishes that there was an easier way to accomplish this, but it does not exist at present.