That's reasonable but even in a world war, you need only put people on nuclear submarines to protect humanity from extinction. Martian colonies are not necessary.
Species can recover even from only a few mating pairs.
It would be catastrophic though.
Ten might as well be zero. 50 people (25 pairs) is necessary with complete control of breeding in order to have sustainable genetic diversity. Without complete control, hundreds are necessary in any given pocket of civilization.
Even if there were tens of millions of humans remaining, there is virtually zero chance of meaningful recovery since all of the low-hanging fruit of industrial-age energy resources have been mined.