TLDR: No, there are only 92 distinct towns. There are 506 Census Tracts.
You can run
getattr(boston_dataset, "DESCR") to get the description of the dataset.
While it does not directly contain the information that you want, it does tell you:
This dataset was taken from the StatLib library which is
maintained at Carnegie Mellon University.
The Boston house-price data of Harrison, D. and Rubinfeld, D.L.
'Hedonic prices and the demand for clean air',
J. Environ. Economics & Management,
vol.5, 81-102, 1978.
If you can get a copy of the paper, you will find in it the line:
The physical changes in NOX concentrations in each of the 506 Boston SMSA
census tracts were calculated for 1990 using the Transportation and Air Shed
Simulation Model (TASSIM ).
If you go to the Statlib site: http://lib.stat.cmu.edu/datasets/
You will see datasets called
boston_corrected. It appears that the data in sklearn.datasets is the
boston set. The
boston_corrected data contains a field for the town. My count is that there are 92 distinct values in that field.