switch from findAll and count to findAndCountAll

a minor refactoring