int (Module module) { Iterator<PsiFile> iterator = myBuilder.getFiles(module); int count = 0; while (iterator.hasNext()) { PsiFile psiFile = iterator.next(); if (getStructure().accept(psiFile)) { count++; } } return count; }