private void countFiles(Project project) {
    final Integer fileCount = project.getUserData(FILE_COUNT);
    if (fileCount == null) {
      myFileIndex.iterateContent(fileOrDir -> {
        if (!fileOrDir.isDirectory()) {
          counting();
        }
        return true;
      });

      VirtualFile[] roots = LibraryUtil.getLibraryRoots(project);
      for (VirtualFile root : roots) {
        if (!ContainerUtil.exists(roots, r -> VfsUtilCore.isAncestor(r, root, true))) {
          countFilesRecursively(root);
        }
      }
      project.putUserData(FILE_COUNT, myTotalFileCount);
    } else {
      myTotalFileCount = fileCount.intValue();
    }
  }
private void countFiles(Project project)