I don't have a formula for this, but I ran a Monte-Carlo simulation for it. This doesn't give an exact answer, but gives a ball-park figure.
I repeatedly selected 6 numbers in the range 0 to 252 at random, and kept count if their sum totalled 508.
I did this 107 times. In around 9000 of these 107 trials the sum totalled 508. The total number of possible ways of allocating 0 to 252 to the 6 stats (without regard for their sum) is 2536, so the likely number of possible ways of allocating 508 points to 6 stats such that no one stat has more than 252 points is approximately (9000/107)*2536 or about 2.3x1011 or 230 billion.