This article details how much password history is stored and for how long when using the password history feature.
It is possible to retain up to 24 passwords per user. Retention is indefinite.