Revert accidental change to the count algorithm