On the shape of the mass-function of dense clumps in the Hi-GAL fields - I. Spectral energy distribution determination and global properties of the mass-functions