Suppose there are n people.
Then the first person shakes hands with others, so shake hands n- 1 times.
The second man shook hands with the others, so he shook hands again n-2 times.
……
In the future, everyone will shake hands with others, one less time each.
To the penultimate person, he only had the last person who didn't shake hands, so he shook hands again 1 time.
So the total number of handshakes is 1+2+3+...+(n- 1).
Because 10= 1+2+3+4.
So 4=n- 1
n=5
So there are always five people attending.