  We prove a Chern-Lashof type formula computing the expected number of
critical points of smooth function on a smooth manifold $M$ randomly chosen
from a finite dimensional subspace $V\subset C^\infty(M)$ equipped with a
Gaussian probability measure. We then use this formula this formula to find the
asymptotics of the expected number of critical points of a random linear
combination of a large number eigenfunctions of the Laplacian on the round
sphere, tori, or a products of two round spheres. In the case $M=S^1$ we show
that the number of critical points of a trigonometric polynomial of degree
$\leq \nu$ is a random variable $Z_\nu$ with expectation $E(Z_\nu)\sim
2\sqrt{0.6}\,\nu$ and variance $var(Z_\nu)\sim c\nu$ as $\nu\to \infty$,
$c\approx 0.35$.
