  In this Chapter I review the role that galaxy clusters play as tools to
constrain cosmological parameters. I will concentrate mostly on the application
of the mass function of galaxy clusters, while other methods, such as that
based on the baryon fraction, are covered by other Chapters of the book. Since
most of the cosmological applications of galaxy clusters rely on precise
measurements of their masses, a substantial part of my Lectures concentrates on
the different methods that have been applied so far to weight galaxy clusters.
I provide in Section 2 a short introduction to the basics of cosmic structure
formation. In Section 3 I describe the Press--Schechter (PS) formalism to
derive the cosmological mass function, then discussing extensions of the PS
approach and the most recent calibrations from N--body simulations. In Section
4 I review the methods to build samples of galaxy clusters at different
wavelengths. Section 5 is devoted to the discussion of different methods to
derive cluster masses. In Section 6 I describe the cosmological constraints,
which have been obtained so far by tracing the cluster mass function with a
variety of methods. Finally, I describe in Section 7 the future perspectives
for cosmology with galaxy clusters and the challenges for clusters to keep
playing an important role in the era of precision cosmology.
