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