Implementing json storing of data for new counter