Use `indexOf` instead of `some` in `count`

Better performance and it is arguably more readable too.