Rotation numbers for Lagrangian systems and Morse theory