Statistical measures of galaxy clusters are sensitive to neutrino masses in the sub-eV range. We explore the possibility of using cluster number counts from the ongoing Planck/SunyaevZel'dovich (SZ) and future cosmic-variance-limited surveys to constrain neutrino masses from cosmic microwave background (CMB) data alone. The precision with which the total neutrino mass can be determined from SZ number counts is limited mostly by uncertainties in the cluster mass function and intracluster gas evolution; these are explicitly accounted for in our analysis. We find that projected results from the Planck/SZ survey can be used to determine the total neutrino mass with a (1σ) uncertainty of 0.06 eV, assuming that it is in the range 0.1 - 0.3 eV, and the survey detection limit is set at the 5σ significance level. Our results constitute a significant improvement on the limits expected from Planck/CMB lensing measurements, 0.15 eV. Based on expected results from the future cosmic-variance-limited (CVL) SZ survey we predict a 1σ uncertainty of 0.04 eV, a level comparable to that expected when CMB lensing extraction is carried out with the same experiment. A few per cent uncertainty in the mass function parameters could result in up to a factor of ∼2–3 degradation of our Planck and CVL forecasts. Our analysis shows that cluster number counts provide a viable complementary cosmological probe to CMB lensing constraints on the total neutrino mass.