Firstly we look at the number of ways that 6 customers can stand in 4 lines. There are 84 of them: (6,0,0,0), (0,6,0,0), (0,0,6,0), (0,0,0,6), (5,1,0,0), ... (2,2,2,0), (2,2,0,2), (2,0,2,2), (0,2,2,2). These are thecompositionsof 6 into at most 4 parts.

You can exhaustively count but you can predict it with the 'stars and bars' method: there are 9-choose-3 = 84 ways of putting 6 stars and 3 bars into 9 places, and each placement corresponds to a composition: for example (5,1,0,0) <-> *****|*|| and (2,0,2,2) <-> **||**|**

For each such (a,b,c,d), there are 6-choose-a ways of selecting the a people and a! ways of arranging them, that is 6!/(6-a)!. Similarly (6-a)-choose-b ways of selecting the next b people and b! ways of arranging them for (6-a)!/(6-a-b)!, and so on. So each (a,b,c,d) contributes 6! after cancellation.

The answer is thus 6! times 9-choose-3 = 60480.