Artificial intelligent assistant

handshakes with everyone except 1 > Jim and his wife Jeri attend a party with 4 other married couples. As they enter, Jim and Jeri shake hands with some of the guests, but not with each other. During the evening, each person except 1 shakes hands with some of the guests, but not with their spouse. After the party, Jim asks each guest how many people they shook hands with and got answers 0,1,2,3,4,5,6,7,8. How many people did Jeri shake hands with? Because of the person with 8 handshakes, Jeri has at least 1 handshake, and this means that person with 0 handshakes is the 8 handshakes person's spouse. Person with 7 handshakes shook hands with person 8 and not with person 0 and his/her spouse, so person 7 too shook hands with Jeri. But now I'm stuck and everything's really confusing... How can I proceed?

Let's say the couples are Alice and Art; Betty and Bob; Cathy and Carl; Diane and Dave; and Jeri and Jim.

Jeri didn't shake $8$ hands (else Jim would never have gotten a response of $0$). So someone from another couple shook $8$ hands. By symmetry it doesn't matter who. Let's say Alice shook $8$ hands (every hand except Art's).

Now everyone except Art has $1$ shake, so Art must be $0$ shakes.

Jeri didn't shake $7$ hands (else Jim would not have gotten a response of $1$). So someone else, say Betty shook $7$ hands. Then the only person who could have shaken $1$ hand would be Bob.

Continuing like this: One of the other couples shook $6$ and $2$ hands; and one shook $5$ and $3$.

This means that Jeri shook $4$ hands. (Incidentally, Jim also shook $4$ hands.)

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 1237cb2e7938a26c1e6ae3bdb9fab3cb