We study the dependence of the quantum yield of photoluminescence of a dense, periodic array of semiconductor nanocrystals (NCs) on the level of doping and NC size. Electrons introduced to NCs via doping quench photoluminescence by the Auger process, so that practically only NCs without electrons contribute to the photoluminescence. Computer simulation and analytical theory are used to find a fraction of such empty NCs as a function of the average number of donors per NC and NC size. For an array of small spherical NCs, the quantization gap between 1S and 1P levels leads to transfer of electrons from NCs with large number of donors to those without donors. As a result, empty NCs become extinct, and photoluminescence is quenched abruptly at an average number of donors per NC close to 1.8. The relative intensity of photoluminescence is shown to correlate with the type of hopping conductivity of an array of NCs.