Fix count check. Fixes #94