  Clusters of galaxies have the potential of providing powerful constraints on
possible deviations from General Relativity. We use the catalogue of
Sunyaev-Zel'dovich sources detected by Planck and consider a correction to the
halo mass function for a f(R) class of modified gravity models, which has been
recently found to reproduce well results from N-body simulations, to place
constraints on the scalaron field amplitude at the present time, $f_{R}^0$. We
find that applying this correction to different calibrations of the halo mass
function produces upper bounds on $f_{R}^0$ tighter by more than an order of
magnitude, ranging from $\log_{10}(-f_{R}^0) < -5.81$ to $\log_{10}(-f_{R}^0) <
-4.40$ (95 % confidence level). This sensitivity is due to the different shape
of the halo mass function, which is degenerate with the parameters used to
calibrate the scaling relations between SZ observables and cluster masses. Any
claim of constraints more stringent that the weaker limit above, based on
cluster number counts, appear to be premature and must be supported by a
careful calibration of the halo mass function and by a robust calibration of
the mass scaling relations.
