  We explain how certain tools from convex analysis and probability theory may
be used in order to obtain counting results for the number of words with
prescribed frequencies of letters in regular languages.
