KnowledgeGraph.node_count()

Count nodes in the graph.

Usage

Source

KnowledgeGraph.node_count(
    *,
    node_type=None,
)

Parameters

node_type: NodeType | None = None
If provided, count only nodes of this type.

Returns

int
Number of matching nodes.