Influence of atomic density in high-order harmonic generation