The statistics for the detection of light by nonideal photomultipliers