You'll want to watch the rule you use for doubled pawns -- the distance from the open file needs to be measured in terms of missing pieces from the opposing side and should be considered for all out of position pawns simultaneously.
When you put the original number together did you consider all of the positions that can arise as the result of promotions? Each pawn can also be one of four other pieces. The same configuration should also be considered a different position depending on who's move it is.
I also think I'd replace the rule that both kings cannot be in check with one that says the side with the move cannot already be checking the opposing king.
According to my calculations there are 72,224,643,857,443,120,117,642,452,381,178,066,698,624 ways to arrange any subset of the starting chess pieces on the board, assuming that the subset contains both kings and there are no pawns on the first or eighth rank.
Obviously, these are not all legal positions. My idea was to take a stratified random sample of these positions, check them for legality, and then use that to estimate the number of legal positions that can be made with just the starting pieces. The idea is to get a count not of all legal positions, but a specific subset of legal positions representing the positions you are likely to encounter.
So what I need now is an algorithm that can check the legality of a position. Another way to look at it is that I need a list of things that make a position illegal. Here is what I've got so far:
What else should be added to that list?
Edits: added items from posts 2 and 6