% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/count_nodes.R
\name{count_nodes}
\alias{count_nodes}
\title{Get a count of all nodes}
\usage{
count_nodes(graph)
}
\arguments{
\item{graph}{A graph object of class \code{dgr_graph}.}
}
\value{
A numeric vector of single length.
}
\description{
From a graph object of class \code{dgr_graph}, get a count of nodes in the graph.
}
\examples{
# Create a graph with a
# path of nodes and 3
# unconnected nodes
graph <-
  create_graph() |>
  add_path(n = 3) |>
  add_n_nodes(n = 3)

# Get a count of all nodes
# in the graph
graph |>
  count_nodes()

}
