Imaging population transfer in atoms with ultrafast electron pulses