Samurai vs. Mongols
Actually the Japanese didn't do that bad against the Mongols, according to
The Samurai, A Military History by S. R. Turnbull:
It is clear from the invasion preparations that Kublai greatly underestimated the fighting capacities of the Japanese, for his army was to consist of no more than 25,000 Mongols, in addition to the Koreans impressed into transport and fighting roles [Page 88].
When they made landfall in 1274, they had an easy time of it . . . at first. They rolled over Tsushima and Iki Islands with little trouble (by sheer weight of numbers; these are small islands with small fighting forces). They hit the mainland pretty hard, too, attacking the town of Hakata:
In spite of all their bravery the Japanese were forced to retreat to the safety of some ancient fortifications built six centuries before. Behind this defence-line of moats and embankments the samurai waited [Page 91].
And no wonder. They had several important social advantages: The Japanese hadn't fought seriously since the Gempei war almost a century past, and had never
ever fought a foreign foe before. Conversely, the Mongols who invaded Japan had been fighting (as opposed to merely training) for their entire lives. In addition, technology was on the Mongols' side in several ways: They had artillery (some form of catapult or ballista), superior archery (at the time!), and better tactics.
So why did the Japanese win? Turnbull continues:
It would appear that the resistance put up by the Japanese had greatly surprised the Mongol leaders, who knew that reinforcements might reach the Japanese at any moment. They were also suffering from a shortage of arrows, for they had prepared only for a 'blitzkrieg' . . . They also feared a possible night attack . . . So the Mongols ordered a tactical withdrawal . . . [Page 91]
The Mongols & Koreans regrouped at sea, managing to get on their boats just in time for a huge storm to wreak havoc on the invading fleet. After that, the invaders basically went home. According to Turnbull:
Korean records tell us that 13,000 men lost their lives in this expedition, many by drowning [Page 91].
I contend that the Japanese would've won anyway: The Mongols couldn't use archery any longer (they were running out of arrows) and
none of the reinforcements from elsewhere in Japan (particularly the sharpshooting Kantou Samurai) had arrived yet. The Mongols had been stalemated by the Kyuushuu forces
alone.
The Japanese knew that the Mongols would probably be back, so they kept close watch on their activities and worked hard at planning their defence and fortifying their country. So, the second invasion, in 1281, did little better. From wikipedia:
In the spring of 1281, the Mongols' Chinese fleet was delayed by difficulties in provisioning and manning the large number of ships they had. Their Korean fleet set sail, suffered heavy losses at Tsushima, and turned back. In the summer, the combined Korean/Chinese fleet took Iki-shima, and moved on to Kyushu, landing at a number of separate positions. In a number of individual skirmishes, known collectively as the Battle of Kouan (弘安の役), or the Second Battle of Hakata Bay, the Mongol forces were driven back to their ships. The now-famous Kamikaze, a massive typhoon, assaulted the shores of Kyushu for two days straight, and destroyed much of the Mongol fleet.
It's worth noting that the Chinese army was over 100,000 strong, and it never did assault the mainland. However, the Japanese resistance was easily comparable in size (in fact it was nearly 400,000 strong nation-wide, though not all of them had arrived yet), and they were all professional warriors (I don't think peasants had been conscripted yet at that point). Likewise, they had been preparing and fortifying for a decade, they were fighting on their home turf, and they were willing to hurl themselves with their famous abandon into the fight. Thanks to recent religious changes they were unified and nationalistic. Though, they did have significant technological disadvantages, I think it would've gone just about the same way even if the Chinese had made landfall.
Yet for the Mongols themselves, they'd been trying to make a beachhead for over a week. Their ships were rotting, many of them were diseased, and the Japanese had been harrying the fleet by conducting repeated guerilla raids. They were destroyed by the Kamikaze because the Japanese had repeatedly beaten them, if you ask me.
-S