counters: add osmo_counters_count() returns the amount of counters
Change-Id: I9068231d71876e06d27ee67a688d7fb611ac3a1b
diff --git a/src/counter.c b/src/counter.c
index 0fa84c8..0fa3166 100644
--- a/src/counter.c
+++ b/src/counter.c
@@ -77,6 +77,13 @@
return rc;
}
+/*! Counts the registered counter
+ * \returns amount of counters */
+int osmo_counters_count()
+{
+ return llist_count(&counters);
+}
+
/*! Find a counter by its name.
* \param[in] name Name used to look-up/search counter
* \returns Counter on success; NULL if not found */