Fix debug output total count bug.