added stack_counter_t type