How to track the number of a chain used in the model simulations?

Not sure what you meant but you are looking for either len(trace) or trace.nchains