While I'm on the SNES side of this debate, Genesis was actually kicking up dust in Nintendo's face for a long time during the 16-bit wars. Sega was a longtime sales leader in the U.S. during the early 90s.
Actually, you are quite correct. But in the end, the two systems sold around 80 million total with Genesis at 30.75 million and SNES at 49.10 million.
Sega did a fantastic job marketing the Genesis in the early days and as much as some people don't like it, Sega propped Sonic up against Mario which is why those two franchises are always compared when discussing the 16-bit consoles.
In the end, Sega's biggest adversary wasn't Nintendo or Sony. It was themselves. They began unraveling when they released the Sega CD and followed it up with disaster after disaster. Namely, the 32X and Saturn. By this point, nothing they could do would keep the Dreamcast alive.
Funny anecdote: Sega's total hardware sales for Master System, Genesis, Saturn and Dreamcast was under
64 million. Nintendo's first system the NES alone sold nearly as much with
61.9 million and the first PlayStation sold
over 102 million.