TITLE: Where is my solution wrong for this combinatorics problem?
QUESTION [9 upvotes]: The question is:

How many ways can you arrange six $X$s in the given figure so that each row has at least one $X$?


(Image taken from the same question from Math Exchange.)
My solution: To have $3$ $X$s in $3$ rows, there are $2 \cdot  4 \cdot 2$ ways to place them. Now there remain $5$ places more and we have $3$ $X$s remaining. So to fill the remaining places, there are $C^5_3$ ways. So total number of ways $= 16 \cdot 10 = 160$. But the answer is $26$. Where am I wrong? Thank you.

REPLY [11 votes]: The problem with your solution is that you count a lot of the combinations twice. For instance, if we first add
 xo
xooo
 xo

and then add the rest of the three to form
 xo
xxxx
 xo

it is the same as starting with 
 xo
ooxo
 xo

and then adding the rest of the x to form 
 xo
xxxx
 xo

Now instead of doing the difficult thing and removing the duplicates of your solution do it like this: Just place all x. This can be done in $8 \choose 6$ ways. However when we fill the top row and the middle row, or the bottom row and the middle row, there is one row without an x. Thus we have to subtract $2$. Hence the solution is  ${8 \choose 6 } - 2 = 26$.