code: public int getChildNodesCount(NodeData parent) throws RepositoryException
     {
        int childsCount =
           changesLog.getChildNodesCount(parent.getIdentifier())
              + (isNew(parent.getIdentifier()) ? 0 : transactionableManager.getChildNodesCount(parent));
        if (childsCount < 0)
        {
           throw new InvalidItemStateException("Node's child nodes were changed in another Session "
              + parent.getQPath().getAsString());
        }
  
        return childsCount;
     }
docs: {@inheritDoc}