How many sovereign states have successfully detonated nuclear weapons?

How many sovereign states have successfully detonated nuclear weapons?