Ok, figured it out. You use SUMPRODUCT, which I did try, but didn't realise that it doesn't work with a whole column range (e.g. A:A), so I did it like this:
=SUMPRODUCT((A1:A10000="School A")*(B1:B10000="Yes"))
Not very efficient as presumably it's checking all of those empty rows, but I don't want to miss data as the spreadsheet expands.