count_nodes function

Get a count of all nodes