Combinatorics & Counting

Answer & solution
Official answer: 7
Because both balls and bins are identical, count unordered partitions of 6 into at most three parts. In nonincreasing order they are (6, 0, 0),(5, 1, 0),(4, 2, 0),(4, 1, 1),(3, 3, 0),(3, 2, 1),(2, 2, 2). Therefore 7 distributions, allowing empty bins as stated by the ordinary distribution model.
Sort occupancies a≥b≥c≥0 so each distribution is counted once. For c=0, b ranges 0…3 giving four cases; for c=1, b=1 or 2 gives two; for c=2, only a=b=c=2 gives one. Hence 4+2+1=7. Stars-and-bars would count labeled bins and overcount here.