Implement APIs for the counter extension

なにこれ？