Suppose I have $n$ cards that I've arbitrarily placed into $p$ piles, possibly of different sizes. The cards are available in $c$ colors, and all cards with the same color are considered identical.
After building these piles, I need to draw a hand of $k$ cards without replacing any of them. If $k > n$, then I'll just do the best I can and draw $n$ cards. There are no restrictions on what cards I can pick, except that I can only draw cards from the top of a pile. How many hands can I draw, if the order of the cards in the hand is important?
EDIT: My understanding of my problem has changed, so I've changed some details of this question. The answer may be very different as a result (but no one has yet posted an answer as of this writing).