On the Morse inequalities for geodesics on Lorentzian manifolds