40M probably isn't going to happen. Nintendo would need to get everything right and they probably won't. Aiming to surpass 30M is a more realistic goal.
In order to get the most from the Wii U that they possibly can, they need to get Mario Kart and Smash Bros. out of the gate and then feature those two games in advertising from now until it's time to abandon the Wii U and move on to the next platform. Those two games will be the life-blood of the system until a Mario Galaxy level game is released. They need to support both games for the next few years in much the way that Sony supported Gran Turismo 6; DLC, free updates, sponsored events and tournaments, and more. Make them a progressive centerpiece of the system which keeps Wii U owners playing them, thus keeping them invested in the console itself. This, hopefully, will keep it from "gathering dust" (and buying software) as well as leading to word-of-mouth advertising. People often communicate things they're currently into, which is why you want your best games to stay in the public consciousness.
The other thing is to keep the price down as low as possible so that it becomes a viable "second console". That needs to be coupled with a more diverse line-up, one which will attract gamers from other systems. Titles like X, Bayonetta, Hyrule Warriors have the potential to entice fans of genres that might do most of their gaming elsewhere. They need more content along those lines.
Nintendo needs to abandon the idea that they can just build a box then sit back and wait for customers to throw money at them. The market is no longer theirs by default.