return $q.all(promises).then(function(result) {
        return result.reduce(function(totalCount, count) {
          totalCount += count;

          return totalCount;