We model the evolution of infrared galaxies using a phenomenological approach to match the observed source counts at different infrared wavelengths. In order to do that, we introduce a new algorithm for reproducing source counts which is based on direct integration of probability distributions rather than using Monte Carlo sampling. We also construct a simple model for the evolution of the luminosity function and the colour distribution of infrared galaxies which utilizes a minimum number of free parameters; we analyse how each of these parameters is constrained by observational data. The model is based on pure luminosity evolution, adopts the Dale & Helou spectral energy distribution (SED) templates, allowing for evolution in the infrared luminosity–colour relation, but does not consider active galactic nuclei as a separately evolving population. We find that the 850-m source counts and redshift distribution depend strongly on the shape of the luminosity evolution function, but only weakly on the details of the SEDs. Based on this observation, we derive the best-fit evolutionary model using the 850-m counts and redshift distribution as constraints. Because of the strong negative K-correction combined with the strong luminosity evolution, the fit has considerable sensitivity to the sub-L★ population at high redshift, and our best fit shows a flattening of the faint end of the luminosity function towards high redshifts. Furthermore, our best-fit model requires a colour evolution which implies the typical dust temperatures of objects with the same luminosities to decrease with redshift. We then compare our best-fit model to observed source counts at shorter and longer wavelengths, which indicates our model reproduces the 70- and 1100-m source counts remarkably well, but underproduces the counts at intermediate wavelengths. Analysis reveals that the discrepancy arises at low redshifts, indicating that revision of the adopted SED library towards lower dust temperatures (at a fixed infrared luminosity) is required. This modification is equivalent to a population of cold galaxies existing at low redshifts, as also indicated by recent Herschel results, which are under-represented in the IRAS sample. We show that the modified model successfully reproduces the source counts in a wide range of infrared and submillimetre wavelengths.