private static boolean countUsagesForMember(@NotNull PsiFile file,
                                              SearchScope scope,
                                              PsiMember member,
                                              Project project,
                                              AtomicInteger totalUsageCount) {
    int count = usagesCount(project, file, member, scope);
    int newCount = totalUsageCount.updateAndGet(old -> count == TOO_MANY_USAGES ? TOO_MANY_USAGES : old + count);
    if (newCount == TOO_MANY_USAGES) return false;
    return true;
  }
private static boolean countUsagesForMember(@NotNull PsiFile file,
                                              SearchScope scope,
                                              PsiMember member,
                                              Project project,
                                              AtomicInteger totalUsageCount)