The problem is as follows:
We have $N$ dice and we throw them on a table. What is the probability that $M$ will fall $X$ times?
Specific example: We have $10$ dice and we throw them on a table. What is the probability that $3$ will occur $7$ times (so there are seven dice out of $10$ which have $3$ on top)?
I am really bad at probability. I've checked a few sites about how I could solve this but it seems too hard figure it out.
This is problem represents a binomial distribution.
We have $N$ trials of $M$, and each of possible $M$ has a $\frac{1}{S}$ chance of occurring, where $S$ is the number of sides on each die. $X$ will represent how many times you want to roll $M$.
So, we can represent this probability as follows:
$$\binom{N}{X}\left(\frac{1}{S}\right)^{X}\left(\frac{S - 1}{S}\right)^{N - X}$$
Expanded, this looks like this:
$$\frac{N!}{X!(N - X)!}\left(\frac{1}{S}\right)^{X}\left(\frac{S - 1}{S}\right)^{N - X}$$
Note that $x!$ is the factorial function, where $n! = \prod_{i = 1}^{n}i$
So, for your specific example, we have:
$$\frac{10!}{7!(10 - 7)!}\left(\frac{1}{6}\right)^{7}\left(\frac{6 - 1}{6}\right)^{10 - 7}$$ $$\frac{10!}{7!3!}\left(\frac{1}{6}\right)^{7}\left(\frac{5}{6}\right)^{3}$$
Which is about $0.0002480725753188030279937001473352639333434943860183$