add tests for count method