add counter method