Number of LSTM layers needed to learn a certain number of sequences
From my personal experience, the units hyperparam in LSTM is not necessary to be the same as max sequence length. Add more units to have the loss curve dive faster.
And about the number of LSTM layers, trying out a single LSTM layer is a good start point, the model trains better with more LSTM layers.
For example, MAX_SEQ_LEN=10, in Keras:
Lstm1 = LSTM(units=30, return_sequences=True); #Time sequence, to feed to next layer
Lstm2 = LSTM(units=20, return_sequences=True); #Time sequence, to feed to next layer
Lstm3 = LSTM(units=10, return_sequences=False);

Output = Lstm3(Lstm2(Lstm1));
```