  Context. While the halo mass function is theoretically a very sensitive
measure of cosmological models, masses of dark-matter halos are poorly defined,
global, and unobservable quantities.
  Aims. We argue that local, observable quantities such as the X-ray
temperatures of galaxy clusters can be directly compared to theoretical
predictions without invoking masses. We derive the X-ray temperature function
directly from the statistics of Gaussian random fluctuations in the
gravitational potential.
  Methods. We derive the abundance of potential minima constrained by the
requirement that they belong to linearly collapsed structures. We then use the
spherical-collapse model to relate linear to non-linear perturbations, and the
virial theorem to convert potential depths to temperatures. No reference is
made to mass or other global quantities in the derivation.
  Results. Applying a proper high-pass filter that removes large enough modes
from the gravitational potential, we derive an X-ray temperature function that
agrees very well with the classical Press-Schechter approach on relevant
temperature scales, but avoids the necessity of measuring masses.
  Conclusions. TThis first study shows that and how an X-ray temperature
function of galaxy clusters can be analytically derived, avoiding the
introduction of poorly defined global quantities such as halo masses. This
approach will be useful for reducing scatter in observed cluster distributions
and thus in cosmological conclusions drawn from them.
