int () { ApplicationManager.getApplication().assertReadAccessAllowed(); // no lock is needed because all chameleons are expanded already int count = 0; for (ASTNode child = getFirstChildNode(); child != null; child = child.getTreeNext()) { if (child.getPsi() instanceof PsiStatement) { count++; } } return count; }