They are a relatively social species and will be happier with company. So I suggest that as you weigh these alternatives, that you lean in favor of two newts in a 10-gallon tank. Two newts will be happier with each other, but may find themselves uncomfortably crowded in a 5-gallon space. If you simply have no room for a 10-gallon set -up, then get just one newt. Loneliness may shorten it’s lifespan, as a lonely animal has a lower immune system, but won’t kill your pet outright, right away. I do recommend 2, if possible, since unlike a bearded dragon or other human-oriented pets that enjoy handling and human interaction, these pets are more for show and dislike being handled, so their only company is really each other.
I hope this helps you think through all of the options. Thank you for asking, it means that you care and are trying to provide the best care possible.