How do you know how many temporal patterns can a TemporalMemory module store?

How can you calculate, for a particular htm.bindings.algorithms.TemporalMemory configuration, how many temporal patterns it can store?
What parameters have an influence on that?
How can you know how many of them are one-step, two-step, three-step, etc?

Thanks in advance