Total valency of a compound is zero. Before starting the topic lets talk about valency.
Valency is the combining capacity of an atom or element.
Now if the element is having a valency = 2,
It means it can make two bonds,
Now if two bonds are made, will it have a capacity to join further?
No, it can’t make any bond. Thus the combining capacity of elements will be zero.