The advent of next-generation surveys will provide a large number of cluster and group detections that will serve the basis for constraining cosmological parameters using cluster counts. This talk will focus on the modelling and understanding of the two main ingredients needed for doing clusters cosmology: obtaining robust cluster selection functions and calibrating accurately the mass-observable relation for clusters. I will present the methodology designed to obtain these two main ingredients based on realistic cosmological simulations for optical next-generation surveys: LSST, Euclid and J-PAS. These results will be discussed and compared with similar results coming from future X-ray and SZ experiments. Finally, preliminary results showing cosmological forecasts obtained for the Dark Energy Equation of State model will be also discussed.