  The formation processes and the evolutionary stages of high-mass stars are
poorly understood compared to low-mass stars. Large-scale surveys are needed to
provide an unbiased census of high column density sites which can potentially
host precursors to high-mass stars. Here we use the ATLASGAL survey covering
420 sq. degree of the Galactic plane at 870 $\mu$m; and use the MRE-GLC method
to identify the population of embedded sources throughout the inner Galaxy. We
identify in total 10861 compact sub-millimeter sources with fluxes above 5
sigma. Completeness tests show that our catalogue is 97% complete above 5 sigma
and >99% complete above 7$\sigma$. We correlate this sample with mid-infrared
point source catalogues (MSX at 21.3 $\mu$m and WISE at 22 $\mu$m) and
determine a lower limit of ~33% that are associated with embedded protostellar
objects. We note that the proportion of clumps associated with mid-infrared
sources increases with increasing flux density, achieving a rather constant
fraction of ~75% of all clumps with fluxes over 5 Jy/beam being associated with
star-formation. Examining the source counts as a function of Galactic longitude
we are able to identify the most prominent star forming regions in the Galaxy.
From the fraction of the likely massive quiescent clumps (~25%) we estimate a
formation time-scale of ~7.5+/-2.5 $\times$ 10$^4$yr for the deeply embedded
phase before the emergence of luminous YSOs. Such a short duration for the
formation of high-mass stars in massive clumps clearly proves that the earliest
phases have to be dynamic with supersonic motions.
