Update count method to handle params like findAll