user3405: What is the number of legal positions in a chess game?
This is a question asked earlier on the site. Now I am wondering, what can be the number of positions for a certain number of pieces. Like 8 pieces for example.
Is there a top bar formula like in that case? Thank you!

user1761: This answer is extended from my comment to Ross Milikan's answer to your question Numerical FEN writing.
There is a website devoted to counting the number of legal positions up to equivalence with given number of pieces. Currently they have results for positions with 2 to 8 pieces. 
2:                     462
3:                 368,079
4:             125,246,598
5:          25,912,594,054
6:       3,787,154,440,416
7:     423,836,835,667,331
8:  38,176,306,877,748,245

With their definition, a position is legal if:

It has exactly one white and one black king
There are no pawns on the 1st and 8th lines
Side to move is not giving a check

Note that with these definitions, some positions could be legal even if they cannot be achieved in a real game. Edit: As @Pimgd pointed out in the comments, an example is a position with white pawns on a2, b2 and a3.
Two positions are considered equivalent if they are essentially the same, in this case, one position can be obtained from another by combining the following operations:

Any position: Swapping the colours of the pieces, the side to move, and mirroring the position around the horizontal line such that the square a1 becomes a8 etc.
Positions with no castling rights: mirroring the position around the vertical line such that the square a1 becomes h1 etc.  
Pawnless positions with no castling rights: mirroring the position around the horizontal line such that a1 becomes a8 etc.
Pawnless positions with no castling rights: Mirroring the board diagonally

Depending on the existence of pawns and castling rights, each "unique" position thus corresponds to 2 to 16 different positions.

3405: <p><a href="https://chess.stackexchange.com/questions/5592/positions-in-chess-games">What is the number of legal positions in a chess game?</a></p>

<p>This is a question asked earlier on the site. Now I am wondering, what can be the number of positions for a certain number of pieces. Like 8 pieces for example.</p>

<p>Is there a top bar formula like in that case? Thank you!</p>
 1761: <p>This answer is extended from my comment to Ross Milikan's answer to your question <a href="https://chess.stackexchange.com/questions/5769/numerical-fen-writing">Numerical FEN writing</a>.</p>

<p>There is a <a href="http://kirill-kryukov.com/chess/nulp/" rel="nofollow noreferrer">website</a> devoted to counting the number of legal positions up to equivalence with given number of pieces. Currently they have results for positions with 2 to 8 pieces. </p>

<pre><code>2:                     462
3:                 368,079
4:             125,246,598
5:          25,912,594,054
6:       3,787,154,440,416
7:     423,836,835,667,331
8:  38,176,306,877,748,245
</code></pre>

<p>With their definition, a position is legal if:</p>

<ul>
<li>It has exactly one white and one black king</li>
<li>There are no pawns on the 1st and 8th lines</li>
<li>Side to move is not giving a check</li>
</ul>

<p>Note that with these definitions, some positions could be legal even if they cannot be achieved in a real game. Edit: As @Pimgd pointed out in the comments, an example is a position with white pawns on a2, b2 and a3.</p>

<p>Two positions are considered equivalent if they are essentially the same, in this case, one position can be obtained from another by combining the following operations:</p>

<ul>
<li>Any position: Swapping the colours of the pieces, the side to move, and mirroring the position around the horizontal line such that the square a1 becomes a8 etc.</li>
<li>Positions with no castling rights: mirroring the position around the vertical line such that the square a1 becomes h1 etc.  </li>
<li>Pawnless positions with no castling rights: mirroring the position around the horizontal line such that a1 becomes a8 etc.</li>
<li>Pawnless positions with no castling rights: Mirroring the board diagonally</li>
</ul>

<p>Depending on the existence of pawns and castling rights, each "unique" position thus corresponds to 2 to 16 different positions.</p>
