The count of contexts the tree represents — an intuitive accessor for
length(tree$nodes) (the number printed in the tree banner).
Examples
# \donttest{
seqs <- replicate(50, sample(c("A","B","C"), 12, replace = TRUE),
simplify = FALSE)
n_nodes(context_tree(seqs, max_depth = 3L))
#> [1] 40
# }