The Church teaches very clearly that the seven sacraments administered by the Church today were instituted by Christ. Those seven “outward signs instituted by Christ to give grace” have been administered by the Church since the first century. There was never a time in Church history when there were twenty two sacraments nor was there ever a time when there were only two.
It could be that there was a time when the term sacrament was used so broadly that it referred to twenty two more generally defined signs, but only seven of those signs would have actually been sacraments as the term is used today. It could also be that there was a time when the term sacrament was used so narrowly that it referred to only two of the actual sacraments but that does not mean that the other five sacraments did not also exist referenced by different terminology.
The following quotations are from the Catechism of the Catholic Church(paragraph numbers in parentheses):
The Sacraments (1210):
Christ instituted the sacraments of the new law. There are seven: Baptism, Confirmation (or Chrismation), the Eucharist, Penance, the Anointing of the Sick, Holy Orders and Matrimony. The seven sacraments touch all the stages and all the important moments of Christian life: they give birth and increase, healing and mission to the Christian’s life of faith. There is thus a certain resemblance between the stages of natural life and the stages of the spiritual life.
From the very day of Pentecost the Church has celebrated and administered holy Baptism. Indeed St. Peter declares to the crowd astounded by his preaching: “Repent, and be baptized every one of you in the name of Jesus Christ for the forgiveness of your sins; and you shall receive the gift of the Holy Spirit.” The apostles and their collaborators offer Baptism to anyone who believed in Jesus: Jews, the God-fearing, pagans. Always, Baptism is seen as connected with faith: “Believe in the Lord Jesus, and you will be saved, you and your household,” St. Paul declared to his jailer in Philippi. And the narrative continues, the jailer “was baptized at once, with all his family.”
From [Pentecost] on the apostles, in fulfillment of Christ’s will, imparted to the newly baptized by the laying on of hands the gift of the Spirit that completes the grace of Baptism. For this reason in the Letter to the Hebrews the doctrine concerning Baptism and the laying on of hands is listed among the first elements of Christian instruction. The imposition of hands is rightly recognized by the Catholic tradition as the origin of the sacrament of Confirmation, which in a certain way perpetuates the grace of Pentecost in the Church.
At the Last Supper, on the night he was betrayed, our Savior instituted the Eucharistic sacrifice of his Body and Blood. This he did in order to perpetuate the sacrifice of the cross throughout the ages until he should come again, and so to entrust to his beloved Spouse, the Church, a memorial of his death and resurrection: a sacrament of love, a sign of unity, a bond of charity, a Paschal banquet “in which Christ is consumed, the mind is filled with grace, and a pledge of future glory is given to us.”
Christ instituted the sacrament of Penance for all sinful members of his Church: above all for those who, since Baptism, have fallen into grave sin, and have thus lost their baptismal grace and wounded ecclesial communion. It is to them that the sacrament of Penance offers a new possibility to convert and to recover the grace of justification. The Fathers of the Church present this sacrament as “the second plank [of salvation] after the shipwreck which is the loss of grace.”
Anointing of the Sick (1510):
However, the apostolic Church has its own rite for the sick, attested to by St. James: “Is any among you sick? Let him call for the elders [presbyters] of the Church and let them pray over him, anointing him with oil in the name of the Lord; and the prayer of faith will save the sick man, and the Lord will raise him up; and if he has committed sins, he will be forgiven.” Tradition has recognized in this rite one of the seven sacraments.
Holy Orders (1555):
Amongst those various offices which have been exercised in the Church from the earliest times the chief place, according to the witness of tradition, is held by the function of those who, through their appointment to the dignity and responsibility of bishop, and in virtue consequently of the unbroken succession going back to the beginning, are regarded as transmitters of the apostolic line.
The matrimonial covenant, by which a man and a woman establish between themselves a partnership of the whole of life, is by its nature ordered toward the good of the spouses and the procreation and education of offspring; this covenant between baptized persons has been raised by Christ the Lord to the dignity of a sacrament.