Probably not right but:

1 cough black 2 coughs white(or vice-versa). They cough before they're shot so the person in front can guess right.

EG: (9 = white.)

10:*guessing* "cough... black cough"
he coughs 2 times so 9 knows he's white. That way at least 9 people would survive.