We consider the exact distribution of the number of peaks in a random permutation of the integers 1, 2, ···, n. This arises from a test of whether n successive observations from a continuous distribution are i.i.d. The Eulerian numbers, which figure in the p.g.f., are then shown to provide a link between the simpler problem of ascents (which has been thoroughly analysed) and both our problem of peaks and similar problems on the circle. This link then permits easy deduction of certain general properties, such as linearity in n of the cumulants, in the more complex settings. Since the focus of the paper is on exact distributional results, a uniform bound on the deviation from the limiting normal is included. A secondary purpose of the paper is synthesis, beginning with the more familiar setting of peaks and troughs.