Many researchers are probably at least somewhat familiar with the federal census, undertaken every ten years beginning in 1790. Before 1850, these records are tallies grouped by age range, gender, and race under the name of the head of household--generally White men--so while they cannot provide information on unnamed individuals, they confer a sense of general numbers, and indicate the households where people of color resided, which then can prompt searches for more information in other sources (the probate files of the White head of households, account books, and so forth).
Beginning in 1850, the census lists by name all free members of households, white and nonwhite, and also each person’s age, sex, place of birth, and the color of each free person in a household (e.g., black, white, or mulatto, Native American or Chinese). Other questions asked about occupation, marital status, the value of real estate, literacy and health/disability status. (for more detailed discussion, see "Melissa Cybulski, Elizabeth Hoff, Betsy McKee and Al McKee, Longmeadow Historical Society, How To Start the Work of Uncovering and Documenting Early Black Lives in Your Community" in this project''s online handbook.)
In addition to the Federal Census, both the colony and Commonwealth of Massachusetts undertook census efforts, some directly related to enslavement. The 1754 Slave Census of Massachusetts counted enslaved people over the age of sixteen in 119 towns in Massachusetts and the territory that would become Maine. A 1765 census was published in Josiah H. Benton’s Early Census Making in Massachusetts. State census records of Massachusetts were taken every ten years from 1855 to 1945, but only the original population schedules for the 1855 and 1865 census still survive.
The U.S. Federal Census and Massachusetts State Census are searchable online via tools that require a subscription (e.g. Ancestry.com). These resources are also widely available without charge at area libraries, in microfilm or through on-site electronic resources.