  Galaxy clusters are a recent cosmological probe. The precision and accuracy
of the cosmological parameters inferred from these objects are affected by the
knowledge of cluster physics, entering the analysis through the mass-observable
scaling relations, and the theoretical description of their mass and redshift
distribution, modelled by the mass function. In this work, we forecast the
impact of different modelling of these ingredients for clusters detected by
future optical and near-IR surveys. We consider the standard cosmological
scenario and the case with a time-dependent equation of state for dark energy.
We analyse the effect of increasing accuracy on the scaling relation
calibration, finding improved constraints on the cosmological parameters. This
higher accuracy exposes the impact of the mass function evaluation, which is a
subdominant source of systematics for current data. We compare two different
evaluations for the mass function. In both cosmological scenarios, the use of
different mass functions leads to biases in the parameter constraints. For the
$\Lambda$CDM model, we find a $1.6 \, \sigma$ shift in the
$(\Omega_m,\sigma_8)$ parameter plane and a discrepancy of $\sim 7 \, \sigma$
for the redshift evolution of the scatter of the scaling relations. For the
scenario with a time-evolving dark energy equation of state, the assumption of
different mass functions results in a $\sim 8 \, \sigma$ tension in the $w_0$
parameter. These results show the impact, and the necessity for a precise
modelling, of the interplay between the redshift evolution of the mass function
and of the scaling relations in the cosmological analysis of galaxy clusters.
