In the official documentation you can find the following code:
var history = element.all(by.repeater('result in memory'));
expect(history.count()).toEqual(2);
But you can also find examples using promises
element.all(by.repeater('app in userApps')).count().then(function(count) {
console.log(count);
});
So why does Protractor sometimes returns a promise and sometimes it returns a value?