Each person shakes hands with 8 other people (everyone except their spouse).
Since there are 10 people in total (5 couples), there are a total of $10 \times 8 = 80$ handshakes.
However, each handshake involves two people, so we have counted each handshake twice.
Therefore, we divide the total number of handshakes by 2 to get the final answer.
Thus, there were $\frac{80}{2} = \boxed{40}$ handshakes in total.The answer is: 40
Below is a math problem. Provide a detailed, step-by-step solution.

### Problem:
At a party, there were five couples. If each person shook hands once with everyone except their spouse, how many handshakes occurred in total?

### Answer:
