add counter_inc, counter_dec
merge code