I am a physicist not a mathematician, which must be why I have just written the must garbled and poorly-written mathematical proof in the history of humanity.
Even-ness can be defined as being congruent with 0mod(2), odd-ness can be defined as congruence with 1mod(2) Every handshake involves two "half-shakes" -one "half-shake" per person. Therefore, no matter how many handshakes there are, the total number of "half-shakes" must be an even number because
if n = total number of handshakes, then the total number of 'half-shakes' =2*n, and 2*n must be an even number, mathematically 2n | 0mod(2) (2n is congruent with 0mod(2) )
Note that when each nerd at the event shakes hands, they are only counting their own "half-shake"
Now, let k =number of people who shook hands an even number of times, 0mod(2) m=number of people who shook hands an odd number of times, 1mod(2)
the condition that must be satisfied, because 2n | 0mod(2), is: 0mod(2) = k * 0mod(2)+m * 1mod(2) (Eq. 1)
No matter whether k is even or odd, the expression (k * 0mod(2) ) must be even, i.e., (k * 0mod(2) ) | 0mod(2), . So this means that the second term ( m * 1mod(2) ) must also be even, i.e. it must congruent with 0mod(2) to satisfy Equation 1. The only way for ( m * 1mod(2) ) to be even is if m is even, or if m | 0mod(2).
Thus m, the number of people having an odd number of handshakes, must be even.
In English if you ask every person how many handshakes they experienced, the sum of their answers must be even (because there are two people for each handshake.). Now separate all the people into two groups; Group 1: those who had an odd number of handshakes and Group 2: those who had an even number of handshakes. In Group 2, the sum of the handshakes will always be even, because any number of people, whether odd or even, times an even number of handshakes will yield a total number that is an even number. Thus, the total number of handshakes in group 1 must also be even. Since everyone in group 1 had an odd number of handshakes, the only way the sum of their handshakes can be even is if there is an even number of people in Group 1.