Fix count()

Adds the `#count()` method.

Fixes #1.