We study exponential families within the class of counting processes and show that a mixed Poisson process belongs to an exponential family if and only if it is either a Poisson process or has a gamma structure distribution. This property can be expressed via exponential martingales.