add stack count profiling script