Using detailed models of galaxy spectra, luminosity functions defined at 60 mu m and pure luminosity evolution, the number-flux relation for extragalactic sources is constructed for wavelengths ranging from the submillimetre, through the infrared, to the K, I and B photometric bands. Such accurate source counts are vital for the preparation of possible survey strategies for the next generation of ground-based instruments and space-borne observatories such as SCUBA, ISO and FIRST. The model consists of non-evolving spiral and elliptical components mixed with an evolving population of starburst galaxies, active galactic nuclei and a hyperluminous galaxy component. Pure luminosity evolution of the form L(z) = L(0)(1 + z)(3.1) is used for all the evolving components. We show that, with this form of universal evolution, an excellent fit is found for both the source counts at 60 mu m and the faint (S < 1 mJy) radio counts at 1.4 GHz where the starburst galaxies are dominant. A new calculation of the infrared (IR) background comes interestingly close to the most recent COBE limits at 500 mu m. By extending our models to the near-IR we find that starburst galaxies only contribute to the K and I bands at the faintest magnitudes and that an open universe provides a better fit than closed world models, although this conclusion is highly dependent on the assumed form of the evolution. In order to build a more complete picture of the extragalactic populations at various wavelengths, we directly connect the 60-mu m and optical luminosity functions for spiral galaxies. For normal spiral galaxies emitting in the IR via IR 'cirrus' (reradiation of starlight by interstellar dust), we confirm earlier findings that [L(IR)/L(B)] approximate to 0.3, supporting the idea that spiral galaxies are on average optically thin to dust. For starburst galaxies we constrain the escape fraction of optical light to 5-10 per cent, and suggest that a strongly evolving starburst component could explain the faint-blue galaxy excess and the increasing number of emission-line objects found in redshift surveys to B approximate to 22-24, depending on the world model.