OP; the majority of video game console developers have lost money on the systems themselves; almost always the concept is to make profit from the software.
Nintendo is not in any real danger currently, if they had simply marketed better and releasted the Wii U under a different name without the gamepad and another controller instead, they would be very high in profit this generation
a lot of people do not realize that numbers sold of systems/games, does not always equate to profit. Nintendo made more in the Gamecube/GBA generation than Sony did with the Playstation 2, yet the Playstation 2 is the best selling system of all time.
at any rate you can't exactly put a pure number on the 'how much hardware does Nintendo need to sell?" because there are so many factors than can effect successful profiting with hardware, from the accessories included, bundles, games, etc. it's an unanswerable question