A friend of mine plays a game where they roll $N$ 10-sided dice (denoted as rolling $Nd10$) and group the dice together in partitions of 1 or more die such that they have as many possible groups whose sum is greater than or equal to 10. For example, consider a roll of 4d10 resulting in 3, 6, 6, and 10. They would be grouped into (10) and (6,6) with a 3 left over, so 2 is the maximum number of groups. It's permissible to throw the 3 in with either of the other groups, but it doesn't effect the final count of 2 groups whose sum is greater than or equal to 10. Let's call the maximum possible number of groups satisfying this constraint for a roll $M$.
I'd like to find the distribution of $M$ with respect to $N$. I'd also like to know things like the expected value of $M$, the modal value, and the variance for a given $N$.
For example, if $N=1$, we have $p(M = 0) = \frac{9}{10}$ and $p(M=1) = \frac{1}{10}$. This is from direct calculation by looking at all possible partitions of the dice rolls, which is trivial, since we're only rolling 1 die. I can also do $N=2$ since there are few enough partitions for direct computation, but it quickly gets out of hand as $N$ increases.
One related problem is given a particular $Nd10$ roll, how do I figure out $M$ algorithmically? I feel like if I understood how to do this, I might have the proper way of thinking to approach the original problem, but I'm not sure how to express what I want mathematically.