Noise in the optical detection of atoms in a beam