Let $C = \{1,...,n\}$ be a set of $n$ colors. Let $S_1,...,S_k$ be non-empty subsets of $C$, that is, $S_i \subseteq C$ for all $i \in \{1,...,k\}$. It is helpful to think of the $S_i$ as urns with colored balls.
We now draw one ball from each $S_i$.
Given $b_1,...,b_n$ with $b_1 +...+ b_n = k$. How many ways are there to draw $b_1$ balls with color $1$, $b_2$ balls with color $2$, ..., and $b_n$ balls with color $n$?
Please note that the special case where each $S_i = C$ is well-known. Here, the number of combinations is $$\binom{k}{b_1}\binom{k-b_1}{b_2}...\binom{k-\sum_{j=1}^{n-2} b_j}{b_{n-1}}\binom{k-\sum_{j=1}^{n-1} b_j}{b_n}.$$
I am looking for a closed form expression. I'm afraid this expression is rather complicated and involves some incarnation of the inclusion-exclusion principle. Alternatively, I'd be interested in an algorithm that is more efficient than a trivial enumeration of all possible combinations.