int (Project project, RunConfiguration settings, Key<? extends BeforeRunTask> @NotNull ... keys) { return Arrays.stream(keys).mapToInt(key -> getInstanceEx(project).getBeforeRunTasks(settings, key).size()).sum(); }