On the number of factors of Sturmian words