code: protected String getSpaceCount(String spaceId, int maxCount) {
          List<String> spaceContentChunk = null;
          long count = 0;
  
          do {
              String marker = null;
              if (spaceContentChunk != null && spaceContentChunk.size() > 0) {
                  marker = spaceContentChunk.get(spaceContentChunk.size() - 1);
              }
              spaceContentChunk = getSpaceContentsChunked(spaceId,
                                                          null,
                                                          MAX_ITEM_COUNT,
                                                          marker);
              count += spaceContentChunk.size();
          } while (spaceContentChunk.size() > 0 && count < maxCount);
  
          String suffix = "";
          if (count >= maxCount) {
              suffix = "+";
          }
          return String.valueOf(count) + suffix;
      }
docs: /*
  Counts the number of items in a space up to the maxCount. If maxCount
  is reached or exceeded, the returned string will indicate this with a
  trailing '+' character (e.g. 1000+).
  
  Note that anecdotal evidence shows that this method of counting
  (using size of chunked calls) is faster in most cases than enumerating
  the Iteration: StorageProviderUtil.count(getSpaceContents(spaceId, null))