When there's a photoelectric effect, do the electrons leave altogether or leave one by one?
In 1905, Einstein demonstrated that the photoelectric effect was a quantum phenomenon. That is, for each photon of light of a minimal specific wavenumber, one electron in a specific orbital is released.

For example, for cesium in its base electron configuration, $\ce{1s^2 2s^2 2p^6 3s^2 3p^6 3d^10 4s^2 4p^6 4d^10 5s^2 5p^6 6s^1}$, about $\pu{3.43E-19 J}$ is needed to raise that electron to, effectively, an "infinite" orbital (where it is unlikely to be found near the atom). This corresponds to a wavelength of $\pu{\approx 580 nm}$ or wavenumber of $\approx \pu{17200 cm-1}$.

That said, very energetic photons may knock out more than one electron apiece, with some of the photon's surplus energy applied to the kinetic energy of the first electron, and some applied to ionizing the atom further. However, at the minimum photon level, for every photon absorbed, one electron is freed. A brighter light has more photons, so a brighter light releases more electrons (with limitations due to the build-up of free electrons near the $\ce{Cs}$ cathode, the space charge).