Nitrogen is able to bond with 4 hydrogen atoms in the compound NH4+ because it is acting as a cation, or positively charged ion. In this case, the nitrogen atom is losing an electron to form the cation and is able to form bonds with 4 hydrogen atoms, which each have one electron to share in a covalent bond. This results in a compound with a positive charge, which is stabilized by the negative charges of the 4 hydrogen atoms.