Question
Why are there seven Sacraments in the Church? Could there be more or less?
Answer
This question was being actively discussed around the time of the Fourth Lateran Council (1215). Theologians were writing and setting limits to the number of sacraments that the church offered. The criteria was set around Christ instituting particular graces, and Sacraments, properly so-called, were signs of particular graces that actually confer those graces. There were others items such as a religious vows as a sacrament, these were moved towards the category of sacramentals, which are elements that point to Sacraments but are not themselves Sacraments. For instance, holy water reminds us of our baptism but blessing someone with it does not repeat the Sacrament.
Seven is a number of fullness and perfection, as in the seven days of creation, or the seven gifts of the Holy Spirit. It is also 3+4, the Trinity plus the direction of the Holy Spirit to the four winds of the church that have been codified throughout time. That there were seven Sacraments of the Church was taken up and affirmed by Saint Thomas Aquinas in his Summa Theologia (ST III-65):
the Sacraments of the Church were instituted for a twofold purpose: namely, in order to perfect people in things pertaining to the worship of God according to the religion of Christian life, and to be a remedy against the defects caused by sin. And in either way it is becoming that there should be seven sacraments.
Aquinas then explains why these seven Sacraments sufficiently cover the range on human need.
More recently, the Second Vatican Council spoke of the Church itself as a sacrament (c.f. Sacrosanctum Concilium par. 5, Lumen Gentium par. 9 & 48), while still affirming the uniqueness of the seven Sacraments.