De Facto countries count as a country for the purposes of this question, including unrecognized ones.
We would have nuclear war within a decade, as the odds of a country with nuclear weapons having a coup and some fanatics launching them for a wide variety of reasons is far higher when there are so many. Not to mention the increased odds of a country firing them off when invaded or to protect a friendly country that is invaded.
One day humanity would end because the president of Turkmenistan got into an argument with the president of Uzbekistan over where the imaginary line that separates the countries is drawn on maps.
Historically nukes have served as an effective deterrent to war, ironically. Given that very strong historical pattern, I’d assume the world would, overall, become a more peaceful and cooperative place thanks to mutually-assured destruction.
Until one of them fires the nukes, that is. But sure, it might not happen
It’s like paying your rent by playing Russian roulette
It’s only happened twice in world history for a reason.
There are thousands of nukes in the world, but no one ever fires them. They make the world more peaceful, not more dangerous.
We’ve gotten very uncomfortably close to a nuclear exchange multiple times in history
The only reason it didn’t happen is pure luck
One thing that would quickly start to happen is a lot of the smaller countries would either be forcefully taken over or be quieted down. Most countries have neighbours they do not share good relations with - and with nuclear armament - bigger of 2 could easily pose nuclear threat and have a much bigger say in their arguments. This could mean taking over contested/disputed lands or some kind of minearl deals being forcefully signed. Soon the total world country count would start to decrease purely because of this (annd would actually accelerate until a point where most countries would form coallitions with some nuclear power and sum total of power on both (or all sides in general) be roughly comparable such that no one poses a greater threat to another and not have an equal threat back at them.
a few dozen nukes make other military strength less important. an army of a few hundred soldiers could destroy a whole other country. so nations could focus on more important things.