The magnitude distribution of QSOs