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.