Handshaking lemma, https://en.wikipedia.org/wiki/Handshaking_lemma, now another Good Article on Wikipedia. This is really about two different but closely-related results, both proved by Euler in his 1736 paper that kicked off the field of graph theory: in any finite undirected graph, the sum of vertex degrees equals twice the number of edges, and the number of odd-degree vertices is even.