Small fix to counting checks