A Morse Index Theorem and bifurcation for perturbed geodesics on Semi-Riemannian Manifolds