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_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index 2869bba..03830de 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -161,7 +161,7 @@
 	/* state incoming */
 	switch (new_state) {
 	case GSM_CSTATE_ACTIVE:
-		osmo_counter_inc(trans->net->active_calls);
+		osmo_stat_item_inc(trans->net->statg->items[MSC_STAT_ACTIVE_CALLS], 1);
 		rate_ctr_inc(&msc->ctr[MSC_CTR_CALL_ACTIVE]);
 		break;
 	}
@@ -169,7 +169,7 @@
 	/* state outgoing */
 	switch (old_state) {
 	case GSM_CSTATE_ACTIVE:
-		osmo_counter_dec(trans->net->active_calls);
+		osmo_stat_item_dec(trans->net->statg->items[MSC_STAT_ACTIVE_CALLS], 1);
 		if (new_state == GSM_CSTATE_DISCONNECT_REQ ||
 				new_state == GSM_CSTATE_DISCONNECT_IND)
 			rate_ctr_inc(&msc->ctr[MSC_CTR_CALL_COMPLETE]);