An interesting article about Mathematics and Chess from Chess.com/chessopedia:

The number of possible chess positions after White’s first ply move is 20 (16 pawn moves and 4 knight moves). There are 400 possible chess positions after two ply moves (first ply move for White followed by first ply move for Black).
There are 5,362 possible positions (White’s second ply move) or 8,902 total positions after two ply moves each. There are 71,852 possible positions or 197,742 total positions after four moves. There are 809,896 possible positions or 4,897,256 total positions after 5 moves.There are 9,132,484 total positions after 6 moves. From move 7 the possible positions stabilize as chess lines end, even from move 2 some chess lines end. There are +-10,921,506 total possible positions after 7 moves.
The special draw, the King's draw, should occur a minimum of 32 times. The longest recorded game ended in a draw after 269 moves.
***
There is a built in limit in the logical positions as the average chess game is about 30 moves, 60 moves and above chess games are a rarity. Lots of chess games end between moves 3 and the final move and the pieces decrease as they are captured. In end game situations the material combinations their frequency and the number of moves needed to mate or draw are known and it is in the region of tens of thousand, limiting the logical possible positions in an end game situation to hundreds of thousand.
Phase Classification ~ # of positions Moves
· Initial position * 1 0
· Opening xxo*oxx +- 5 x 10^6 1 - 5
· Opening xxxooo*oooxxx +- 40 x 10^6 6 - 10
· Middle game xxxoooo*ooooxxx +- 45 x 10^6 11 - 15
· Middle game xxxooo*oooxxx +- 40 x 10^6 16 - 20
· End game xxxo8*8oxxx +- 5 x 10^6 21 - 25
· End game xo*8x +- 5 x 10^6 26 - 30
· End game o*8 +- 0.1 x 10^5 31 - Final move

Logical possible positions +- 140.1 x 10^6 + 1
Possible/playable chess games (Avg game 30 moves) +- 4,670,033
~# Of total draw positions @ 7% of playable games +- 326,933
*=draw, o=winning/lose, x=other, 8=known end game combinations

A guesstimate is that the maximum logical possible positions are somewhere in the region of +-140,100,033, including trans-positional positions, giving the approximation of 4,670,033 maximum logical possible games, thus making chess very playable.

When compared to the numbers available from online databases the actual number of games played so far , for reasonable players, seem to be somewhere in the region of +-2,910,286 which should be taken as a minimum number for the possible logical games.