How many possible combinations for the number of pieces on the board? My question concerns the total material available on the chess board (black+white pieces). At the very beginning of a game, there are 2 Kings, 2 Queens, 4 Rooks, 4 Bishops, 4 Knights and 16 pawns. These can be represented by an array (2, 2, 4, 4, 4, 16). As the game progresses, the total amount of material will change, thus the array will change. My question is as follows. Looking at all theoretically possible games played from the initial position, how many unique arrays are possible to reach? The fact that a pawn can be promoted to any light or heavy piece makes the problem even more tricky!

Initial Board

16 Pawns
 4 Rooks
 4 Bishops
 4 Knights
 2 Queens
 2 Kings


After a pawn capture

15 Pawns
 4 Rooks
 4 Bishops
 4 Knights
 2 Queens
 2 Kings 


Only kings left

 0 Pawns
 0 Rooks
 0 Bishops
 0 Knights
 0 Queens
 2 Kings


But it get more complex when you include pawn promotion (to any piece excluding pawn and king). 

So what is the total number of combinations?



I've listed 3 combinations above. Here a 6 more

 P  R  N  B  Q  K
32  4  4  4  2  2  Initial Position and remains the same until a capture
32  3  4  4  2  2  First capture frequency combinations.  
32  4  3  4  2  2
32  4  4  3  2  2
32  4  4  4  1  2
31  4  4  4  2  2  Pawn 
etc
etc
0  0  0  0  0  2  Only Kings


It get tricky at pawn promotion cos each of the 16 pawns can turn in one of 4 pieces (R B N Q).  Which is why I curious to know the total number of (unique piece frequencies)
It's :
numberOfPawnsPieces(=17) * numberOfRooksPieces(=5) * numberOfBishopsPieces(=5) * numberOfKnightsPieces(=5) * numberOfQueensPieces(=3) * numberOfKingsPieces(=1)
= 6375 

I added one to each number of same piece in case there is no one of its kind(for queens for example, there may be two queens, one queen, or none), except for Kings where there always must be 2 kings on the board, so the number of combinations for kings number is only 1.  

**

EDIT : In cas there is promotions of pawns

**
My idea to tackle this is to separate all possible cases, i.e. when there is promotion of 1 pawn, promotion of 2 pawns,...,promotion of 8 pawns. ( 8 pawns is the maximum number of possible promotions )
Generally speaking, when x pawns are promoted, we will proceed same as above, but the number of pawns will be in each case (16-x), plus an other group of 4 * x possibly created pieces. Finally we will sum all over the cases :

                17*5*5*5*3*1 + SUM[x=1--&gt;16,(16-x+1)*5*5*5*3*(4*x)] = **1 230 375**


This is approximate, I may have forgotten some cases, or added some positions that are just impossible to happen in a chess game,...etc.