On the number of occurrences of a symbol in words of regular languages