Nintendo reported a stellar second-quarter again. Now it is clearly running away with the console war in terms of units sold and profits made.

Nintendo generated about $99 million in net income on sales of $4 billion in the quarter.

The Japanese company sold 5.17 million Wii consoles during the three months ended June 30. That brings its worldwide sales total to 29.62 million since the console launched in the fall of 2006. By comparison, Sony just reported that it has sold 14.4 million PlayStation 3s, while Microsoft reported that it has sold more than 20 million Xbox 360s. On a worldwide basis, the battle isn’t even close.

The handheld Nintendo DS is also running away with the torch. Nintendo sold 6.94 million DS units in the quarter, bringing the lifetime total to 77.54 million units. Sony has sold about 36 million PlayStation Portable handhelds.

Sony’s game group operating income in the quarter was $50 million on sales of $2.1 billion, compared to a loss of $270 million a year ago on sales of $1.8 billion. Microsoft’s Entertainment & Devices Group, which includes the Xbox 360, lost $188 million in the quarter.

Nintendo got a big boost from hit games such as Mario Kart Wii, which sold 6.42 million units, and Wii Fit, which sold 3.42 million units. Total Wii software sales are now at 40.41 million units.