Fix bug where count could report 1 when 0