How can you define Valency?

The number of electrons which an atom gains or loses or shares with other atoms to attain noble gas configuration is termed its valency.