code: private long getSpaceCount(ContentStore store, String spaceId)
          throws ContentStoreException {
          SpaceStatsDTOList stats =
              store.getSpaceStats(spaceId, new Date(System.currentTimeMillis() - (24 * 60 * 60 * 1000)), new Date());
  
          long count = 0;
  
          if (stats != null && stats.size() > 0) {
              count = stats.getLast().getObjectCount();
          }
  
          return count;
      }
docs: /*
  Count the number of content items in a space in a DuraCloud account