Valency is the measure of an atom's ability to combine with other atoms to form molecules or chemical compounds. It specifically refers to the number of chemical bonds an atom can form, which is determined by the number of electrons an atom can gain, lose, or share during chemical reactions. This is based on the electrons in the outermost shell, known as valence electrons, and how atoms achieve a stable electron configuration, often similar to noble gases. For example, hydrogen has a valency of 1, oxygen 2, and carbon 4, which reflects how many atoms of other elements each can bond with.