There are 21 girls.
Explanation:
If the ratio is 6:7, and the number of boys is 18, we divide 18 by 6 to get 3. Which means 3 times 6 is 18. If we multiply the numerator by 3, we do the same to the denominator. 7・3 is 21. Therefore there are 21 girls. (The ratio is 18:21)