We may likewise gather the number of the sacraments from their being instituted as a remedy against the defect caused by sin. For Baptism is intended as a remedy against the absence of spiritual life; Confirmation, against the infirmity of soul found in those of recent birth; the Eucharist, against the soul's proneness to sin; Penance, against actual sin committed after baptism; Extreme Unction, against the remainders of sins—of those sins, namely, which are not sufficiently removed by Penance, whether through negligence or through ignorance; Order, against divisions in the community; Matrimony, as a remedy against concupiscence in the individual, and against the decrease in numbers that results from death.
[St. Thomas Aquinas, Summa Theologiae 3.65.1.]
Note that the difference between this remedial scheme and the previous one is that this one is concerned with the 'parts' of every sinful action, moving from their bad root (absence or weakness of spiritual life) through the actual sins to their sinful effects.