Add Json function in counter.c