Tentative fixe for #37

This pull request fixes the `count` bug described in #37