The repeated passage of a coasting ion beam of a storage ring through a thin target induces a shift in the revolution frequency due to the energy loss in the target. Since the frequency shift is proportional to the beam-target overlap, its measurement offers the possibility of determining the target thickness and hence the corresponding luminosity in an experiment. This effect has been investigated with an internal proton beam of energy 2.65 GeV at the COSY-Julich accelerator using the ANKE spectrometer and a hydrogen cluster-jet target. Possible sources of error, especially those arising from the influence of residual gas in the ring, were carefully studied, resulting in a accuracy of better than 5%. The luminosity determined in this way was used, in conjunction with measurements in the ANKE forward detector, to determine the cross section for elastic proton-proton scattering. The result is compared to published data as well as to the predictions of a phase shift solution. The practicability and the limitations of the energy-loss method are discussed.