On the number of generators of ideals in local rings