If you have several dice, and you want to know what chance you have of getting a specific formula, then the solution is P = (h+m)^n, where h is the chance of hits, m is the chances of missing, and n is the number of dice involved.
This expands out to a polynomial, eg for 3, h³ + 3h²m + 3hm² + m³.
So if your chance of hitting is say 2 (ie 5, 6), and your miss is 4, (ie 1,2,3,4), this comes out to
8 tri-hits, 3*4*4 = 48 bi-hits, 3*2*16 = 96 hits and 4*4*4 = 64 misses. The sum of these numnbers ought be 216 tosses.
You use the row of the pascal triangle, along with powers of the hit/miss ratio, as
8 7 6 5 4 3 2 1 0 hits out of 8
1 8 28 56 70 56 28 8 1 ie n! / h! m!
256 128 64 32 16 8 4 2 1 hits ie 2^h
1 4 16 64 256 1024 4096 16384 65536 misses ie 4^m
n! means 1 * 2 * 3 * 4 * 5 * ... n! It is the factorial.
The first line counts all the different ways of arranging say two hits and six misses (at any probability), ie hmmmhmmm and hmhmmmm are both counted.
The second line counts the possible ways of getting 6 hits, eg 5,6,5,5,6,5 six hits. There are 64 ways of doing this.
The third line counts the possible ways of getting misses, so 2,2,4,3,1 is a way of getting 5 misses.
The total of the row is (H+M)^n, the total possible throws over all the dice. In the present case, H=2, M=4, and H+M=6 possible values, so you have 6^8 = 1679616 possible throws.
The number of 4 hits from 8 die is then 70*16*256/1679616 = 0.170705685
This formula can be implemented in code to handle a large number of throws.
Best Answer
The probabilities of outcomes of the die do not depend on which outcomes you consider to be equivalent. The die rolls and stops rolling as it always does.
When we were paying attention to the sequence in which the numbers appeared, there was just a $\frac{1}{36}$ chance of getting $(4,4),$ a $\frac{1}{36}$ chance of getting $(2,3),$ and a $\frac{1}{36}$ chance of getting $(3,2).$ When we only consider events distinct based on the number of times each face of the die has occurred, there is still only a $\frac{1}{36}$ chance that face $4$ occurred twice in two rolls, and there is still a $\frac{1}{18}$ chance that $2$ and $3$ each occurred once.
Compare this to what happens if we only write down the sum of the numbers that occur, not the actual numbers themselves. The probability that the total is $5$ is $\frac 19,$ but the probability that the total is $8$ is $\frac{5}{36},$ which is greater.