In this paper we develop a Morse theory for time-like geodesics parameterized by a constant multiple of proper time. The results are obtained using an extension to the time-like case of the relativistic Fermat principle, and techniques from Global Analysis on infinite dimensional manifolds. In the second part of the paper we discuss a limit process that allows to obtain also a Morse theory for light rays.