A general solution to ensure that a rounded collection of numbers still adds up to the same as it did before is quite difficult. However, I think you are just doing two numbers, so one is 100% minus the other:
int boys_pc = (int)(0.5f + ((100f * boys_count) / total_count));
int girls_pc = 100 - boys_pc;
Cast to float to avoid integer division giving you a zero, and add 0.5 for integer rounding. Use 0.5f not 0.5 to keep it from expanding to double (which is overkill for something which will be rounded to int anyway).
Edit: If you have to multiply anyway, just multiply by a float constant (e.g. 100f not 100) to avoid integer division.