How to handle Numbers' automatic Data Formatting?
Without access to the spreadsheet that you've shown, I've attempted to recreate this myself. It appears that there are two things wrong with the spreadsheet above:


The test-array for the countif is of Data Format Automatic. This means that the zeros are not of format Duration and can't be compared by the countif.

To fix this, select the entire array and choose Duration from the Data Format list.
The countif's condition is of format Number whereas the test-array is of format Duration.

To fix this, use the following for the countif cell:

=COUNTIF(G2:G11,"&gt;0h 0m")