Only eight countries in the world are known to possess nuclear weapons, as of 2014: the United States, Russia, China, France, the United Kingdom, Israel, Pakistan and India. North Korea may possess fewer than 10 nuclear warheads, according to the International Campaign to Abolish Nuclear Weapons (ICAN)..
Of the eight, or possibly nine, countries that are known to possess nuclear warheads, only five are legally allowed to do so under the Nuclear Non-Proliferation Treaty (NPT). These five countries are the United States, Russia, China, France and the United Kingdom. Israel, Pakistan and India have never signed the NPT, so they are not technically bound by it, which is how these countries legitimize the possession of their nuclear arsenals.
North Korea had also signed the treaty, but the country eventually renounced it and began attempting to produce nuclear weapons. As of 2014, it is estimated that North Korea has produced enough material to make between six and 10 nuclear warheads, but it is not known if it has weapons capable of delivering them.
South Africa used to possess a small number of nuclear weapons, but it dismantled them before signing the NPT in 1991. There are also a number of other countries who had been developing nuclear weapons prior to signing the treaty, including Brazil, Taiwan, South Korea and Argentina.