There will be more elegant ways to accomplish this, but as a quick fix do
the following.
In 3 cells that are not being used, Just enter the formula
=if(subtotal1=0,1,0)
Change subtotal 1 for each of the subtotals/cell references concerned.
You can simply do a =sum(subtotal1:subtotal3) to accomplish your target
count.