In the talk I will discuss classes of enumerative problems enjoying the property that every problem in the class has counting function which is a polynomial (or a quasipolynomial) for large n. Examples of this phenomenon include counting lattice points in polytopes, counting elements of sumsets in abelian semigroups, and-last but not least-counting permutations avoiding forbidden patterns.