What’s a safe distance between us and a supernova?

And how many potentially exploding stars are located within the unsafe distance?