code: public void countItems() {
      itemCounts = new ItemCounts();
      itemCounts.startTime = System.currentTimeMillis();
      itemCounts.numDirectories = 1; // count the current directory
      itemCounts.numFiles = 0;
      itemCounts.numBlocks = 0;
      if (children != null) {
        for (INode child : children) {
          countItemsRecursively(child);
        }
      }
      itemCounts.finishTime = System.currentTimeMillis();
    }
docs: Count items under the current directory