  We compute exactly the full distribution of the number $m$ of local minima in
a one-dimensional landscape generated by a random walk or a L\'evy flight. We
consider two different ensembles of landscapes, one with a fixed number of
steps $N$ and the other till the first-passage time of the random walk to the
origin. We show that the distribution of $m$ is drastically different in the
two ensembles (Gaussian in the former case, while having a power-law tail in
the latter $m^{-3/2}$ in the latter case). However, the most striking aspect of
our results is that, in each case, the distribution is completely universal for
all $m$ (and not just for large $m$), i.e., independent of the jump
distribution in the random walk. This means that the distributions are exactly
identical for L\'evy flights and random walks with finite jump variance. Our
analytical results are in excellent agreement with our numerical simulations.
