Four. There are ten guests, and each can have shaken at most eight hands. I received a different answer from each of the nine guests, so the answers must range from zero to eight. The person who shook eight hands (call this guest “8”) has exhausted the party except for himself and his spouse, who is thus the only person who can have answered zero. So 8 and 0 are married.

A similar argument applies to 7. He shook the hands of all but three guests: these must be himself, his spouse, and 8’s spouse, who we now know is 0. So 7 must be married to 1 (7’s spouse is the only person in the party still capable of claiming to have shaken only one hand). In the same way, 6 must be married to 2 and 5 to 3. This means that my wife shook four hands.