replace osmo_counter with stat_items

osmo_counter will be soon deprecated. Use the newer and more flexible
osmo_stat_item instead.

Depends on: Id2462c4866bd22bc2338c9c8f69b775f88ae7511 (libosmocore)
Change-Id: I6a20123b263f4f808153794ee8a735092deb399e
diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c
index 79fcb5a..8a13cda 100644
--- a/src/libmsc/gsm_09_11.c
+++ b/src/libmsc/gsm_09_11.c
@@ -32,6 +32,7 @@
 
 #include <osmocom/core/linuxlist.h>
 #include <osmocom/core/rate_ctr.h>
+#include <osmocom/core/stat_item.h>
 #include <osmocom/core/utils.h>
 #include <osmocom/core/msgb.h>
 
@@ -158,7 +159,7 @@
 			ncss_session_timeout_handler, trans);
 
 		/* Count active NC SS/USSD sessions */
-		osmo_counter_inc(net->active_nc_ss);
+		osmo_stat_item_inc(net->statg->items[MSC_STAT_ACTIVE_NC_SS], 1);
 
 		trans->dlci = OMSC_LINKID_CB(msg);
 		trans->msc_a = msc_a;
@@ -362,7 +363,7 @@
 	}
 
 	/* Count active NC SS/USSD sessions */
-	osmo_counter_inc(net->active_nc_ss);
+	osmo_stat_item_inc(net->statg->items[MSC_STAT_ACTIVE_NC_SS], 1);
 
 	/* Init inactivity timer */
 	osmo_timer_setup(&trans->ss.timer_guard,
@@ -414,7 +415,7 @@
 	osmo_timer_del(&trans->ss.timer_guard);
 
 	/* One session less */
-	osmo_counter_dec(trans->net->active_nc_ss);
+	osmo_stat_item_dec(trans->net->statg->items[MSC_STAT_ACTIVE_NC_SS], 1);
 }
 
 int gsm0911_gsup_rx(struct gsup_client_mux *gcm, void *data, const struct osmo_gsup_message *gsup_msg)