I'm studying probability from probabilitycourse.com and was reading the "Unordered sampling without replacement" section for a motivation on combinations. It's very nicely explained as follows: suppose there's $n$ items from which $k$ must be selected and order doesn't matter. Then the number of ordered samples would be $n(n-1)\ldots(n-k+1)$ and each unordered sample would've been overcounted by a factor of $k!$, so we divide by that, getting the usual $\binom{n}{k}$.
Now we turn to the question in the title and for the life of me, I can't apply the same kind of logic in this scenario. The answer seems to be $\binom{23}{6}$ but I can't understand why.
Another question relevant to this post is here: You have 6 red balls, 6 blue, and 6 white. You randomly select a sample of 5 balls. The number of ways to select $5$ balls from $6$ red, $6$ blue and $6$ white seems to be $\binom{18}{5}$
To make life easier I considered a simpler case - if there are $3$ red balls and $3$ yellow balls, and we have to randomly select $3$ from them.
Let's label the balls $a,b,c,d,e$ and $f$, and suppose the first three are red and the last three are yellow. The number of ordered pairs would be $6\times 5\times 4$. Adjusting for overcounting for triplets like $(a,d,e),(a,e,d),(e,a,d),(e,d,a),(d,a,e),(d,e,a)$, etc., we divide the whole thing by $3!$.
But haven't we still not adjusted for another kind of overcounting? Considering all triplets with, e.g., one red and two yellow as equivalent, triplets such as $(a,d,e)$ and $(b,d,f)$ are still overcounts, because all of them have one red and two yellow. So wouldn't $\binom{6}{3}$ be an overestimation? And is there a way to arrive at the correct answer without considering counts for individual cases like "two red, one yellow", "one red, two yellow", "three red", etc. and adding them up?