but that is not sum, that is a count.

Did you check Tony Valko's suggestion?