Cleaner way to count elements, using _.filter