I was reading about how to choose divergent diagrams in QED by using the concept of Superficial degree of divergence. We have an empirical relation $$ D= 4-E_b -\frac{3}{2}E_f $$ where $E_b$ is number of external photons and $E_f$ is number of external fermions. There are some values for $(E_b,E_f) $ which mathematically satisfy this relation but are not taken into account because of some physical conditions. There is one such concept I didn't understand.
Conservation of Charge demands that $E_f$ can not be odd number. As I understand,we have to apply conservation of charge at each vertex; but how does it control number of external lines?