The size of the graph is the number of edges
size(graph)
graph
The graph.
Numeric scalar, the number of edges.
G <- graph(list(A = c("B", "C"), B = "C", C = "A")) size(G)