Because, obviously, no person shook hands with his or her partner, nobody shook hands with more than eight other people. And since nine people shook hands with different numbers of people, these numbers must be 0, 1, 2, 3, 4, 5, 6, 7, and 8.
The person who shook 8 hands only did not shake hands with his or her partner, and must therefore be married to the person who shook 0 hands.
The person who shook 7 hands, shook hands with all people who also shook hands with the person who shook 8 hands (so in total at least 2 handshakes per person), except for his or her partner. So this person must be married to the person who shook 1 hand.
The person who shook 6 hands, shook hands with all people who also shook hands with the persons who shook 8 and 7 hands (so in total at least 3 handshakes per person), except for his or her partner. So this person must be married to the person who shook 2 hands.
The person who shook 5 hands, shook hands with all people who also shook hands with the persons who shook 8, 7, and 6 hands (so in total at least 4 handshakes per person), except for his or her partner. So this person must be married to the person who shook 3 hands.
The only person left, is the one who shook 4 hands, and which must be Jack's wife. Jack's wife shook 4 hands.