The Becchi–Rouet–Stora–Tyutin (BRST) supersymmetry is a powerful tool for the calculation of the complexity of metastable states in glassy systems, and it is particularly useful to uncover the relationships between complexity and standard thermodynamics. In this work we compute the Thouless–Anderson–Palmer (TAP) complexity of the Sherrington–Kirkpatrick model at the quenched level, by using the BRST supersymmetry. We show that the complexity calculated at K steps of replica symmetry breaking is strictly related to the static free energy at K + 1 steps of replica symmetry breaking. The supersymmetry therefore provides a prescription to obtain the complexity of the TAP states from the standard static free energy, even in models which are solved by more than one step of replica symmetry breaking. This recipe states that the complexity is given by the Legendre transform of the static free energy, where the Legendre parameter is the largest replica symmetry breaking point of the overlap matrix.