code: protected void countSpaces(String host,
                                 DuplicationInfo info,
                                 ContentStore store,
                                 List<String> spaces,
                                 boolean primary) {
          String storeId = store.getStoreId();
          String storeType = store.getStorageProviderType();
          for (String spaceId : spaces) {
              boolean doCount = false;
              // Handle spaces which include space ID, formatted like: spaceId:storeId
              if (spaceId.indexOf(":") > -1) {
                  String[] spaceAndStoreId = spaceId.split(":");
                  spaceId = spaceAndStoreId[0];
                  if (primary || storeId.equals(spaceAndStoreId[1])) {
                      doCount = true;
                  }
              } else {
                  doCount = true;
              }
  
              if (doCount) {
                  countSpace(host, spaceId, storeId, storeType, info, store);
              }
          }
      }
docs: /*
  Perform a content count for all spaces in the list for the given account