You need a strategy. Simplify often works.
If two came: One Bump
If three came: Three bumps
If four came: Six Bumps
It may also be useful to ponder a parity issue. Each bump takes two heads. Maybe not.
Would it be easier if you lines them up and had the first person in line bump heads with everyone else. For example: Five people, names A, B, C, D, and E.
Line them up:
ABCDE
Have A bump everyone
AB, AC, AD, AE and then run off to the other room.
Have B bump everyone.
BC, CD, BE and then run to the other room
Have C bump everyone.
CD, CE and then run to the other room.
Have D bump everyone
DE and run to the other room.
We started with five and produced a pattern 4, 3, 2, 1 - making 10
If we start with 4, we might get 3, 2, 1 and that's six! This is consistent with the original claim.
If we start with 3, we might get 2, 1 and that's 3.
I think we're done.