**Answer:** 3,672.

The actual number of girls and boys doesn't actually matter!

If all of the children were girls then half of them (306) would be given 12 sweets:

306 x 12 = 3672

If all of the children were boys then three quarters of them (459) would be given 8 sweets:

459 x 8 = 3672

If there were 512 girls (so 256 would get 12 sweets = 3072) and 100 boys (so 75 would get 8 sweets = 600):

256 x 12 + 75 x 8 = 3672

We can change the numbers of girls and boys, but it doesn't change the answer. The reason for this lies in the fact that 1/2 girls x 12 sweets = 3/4 boys x 8 sweets (both are 6).