Add NodesCount and fix comment to aos/configuration.h
Jim points out that a comment is confusing, so fix it.
Also, a number of users want to count the number of nodes both in
multinode and single node. Put that in a library.
Change-Id: I5619d60255de19d730db528f060aac5da758d876
diff --git a/aos/configuration.h b/aos/configuration.h
index 16d2d6c..78522b6 100644
--- a/aos/configuration.h
+++ b/aos/configuration.h
@@ -40,7 +40,7 @@
FlatbufferDetachedBuffer<Configuration> MergeWithConfig(
const Configuration *config, const Flatbuffer<Configuration> &addition);
-// Returns the resolved location for a name, type, and application name. Returns
+// Returns the resolved Channel for a name, type, and application name. Returns
// nullptr if none is found.
//
// If the application name is empty, it is ignored. Maps are processed in
@@ -111,6 +111,8 @@
// to a node in config, but is not required.
int GetNodeIndex(const Configuration *config, const Node *node);
int GetNodeIndex(const Configuration *config, std::string_view name);
+// Returns the number of nodes.
+size_t NodesCount(const Configuration *config);
// Returns true if we are running in a multinode configuration.
bool MultiNode(const Configuration *config);