In QED we have can find a function $$D=f(N_i)\tag{1}$$ where $f(N_i)$ means a function of number $N_i$ of external lines only.
In 4D, we have $$D=4L-P_e-2P_\gamma.\tag{2}$$ This step is universal. We can have a similar expression for any theory, I think.
And then an identity from diagram theory $$L=I-V+1\tag{3}$$ Where $V$ is the number of vertex and $I\equiv P$ the number of internal lines.
And the lecture by Matthias Neubert claimed:The only vertex of QED connects two fermion lines to a photon line, and hence we can express $$V=2P_\gamma+N_\gamma=\frac1 2(2P_e+N_e).\tag{4}$$
Can someone explain it in detail why this identity is true? And can we find a similar identity for any theory and finally have a function $$D=f(N_i).\tag{5}$$
