Implement APIs for the counter extension

ごみごみ