In a tabular database, patterns that occur over a frequency threshold are called frequent patterns. They are central in numerous data processes and various efficient algorithms were recently designed for mining them. Unfortunately, very little is known about the real difficulty of this mining, which is closely related to the number of such patterns. The worst case analysis always leads to an exponential number of frequent patterns, but experimentation shows that algorithms become efficient for reasonable frequency thresholds. In order to explain this behaviour, we perform here a probabilistic analysis of the number of frequent patterns. We first introduce a general model of random databases that encompasses all the previous classical models. In this model, the rows of the database are seen as independent words generated by the same probabilistic source (i.e., a random process that emits symbols). Under natural conditions on the source, the average number of frequent patterns is studied for various frequency thresholds. Note that the source may be nonexplicit since the conditions deal with the words. Then, we exhibit a large class of sources, the class of dynamical sources, which is proven to satisfy our general conditions. This finally shows that our results hold in a quite general context of random databases.