Add stack trace count

Add the count to see at what particular step a function is being called.