For the first thousand years of Church history there was no final definition of what constituted a sacrament, nor was the number of sacraments agreed upon.  St. Augustine's definition of a "visible form of invisible grace" was broad enough to encompass many things and actions associated with the life of the church.  At various times this list included the kiss of peace, ashes, holy water, baptismal fonts, chalices and patens, vestments, the Lord's Prayer, the Creed, Scripture, the dedication of churches, the crowning of kings, the Incarnation, the Church itself, and numerous other rites and sacred objects.

Gradually, consensus recognized that some visible signs were more important than others.   Actions were seen to take precedence over things.  Sacraments were not just holy things.  Sacraments were efficacious; they mediated the grace of God.  Eventually a distinction was made between sacraments and sacramentals; sacramentals signify inward spiritual grace which is obtained through the Church.  They help the faithful to receive God's grace.
In determining what constituted a sacrament, the focus shifted to rituals central to the lived experience of the Church.  In the twelfth century Peter Abeiard listed six sacraments.  He chose to omit Holy Orders from his list.  In 1274 the Second Council of Lyons agreed upon seven sacraments.

Catholic Teaching on the Sacraments
The Center for Learning