Fix .count() to be compatible

Fixes #54
Compact test for #54