int (PsiExpression expression) { if (expression instanceof PsiArrayInitializerExpression arrayExpression) { final PsiExpression[] initializers = arrayExpression.getInitializers(); return Arrays.stream(initializers).mapToInt(this::calculateNumElements).sum(); } return 1; }