If all they used were katana, sure, but they used many other weapons, and would have been able to defeat them with those. Even with full plate knights were taken down by longbows, and especially with [三人張り] Sannin-bari and [四人張り] Yonnin-bari, 3-man and 4-man bows respectively (the number of men indicating number of average strength men needed to bend the stave and string the bow) could easily have done so; modern Kyuudo bows are similar in draw weight to modern English archery practice bows, because they don't rely on serious strength; it's a sport about precision, rather than power. The "shit quality of the iron" was why they needed to forge it so much, by the by; it got it pretty pure and forced the iron sand to form a cohesive whole. The quality issue was in the raw material, not the finished product.
So between 256 (lower-end, mass-produced blades) and 65,536 (higher-end, probably ceremonial blades like the giant swords mounted in shrines) layers? Sounds about right (every fold is 2^n, where n = the number of the fold; 8 is 256 but 10 is 1024; exponential growth is a hell of a thing).
During the first, you mean? Because by the second they had adapted to the tactics of the Mongols and held them off at the beaches. And the only reason they stomped the samurai during the first invasion (and weren't tested in return if they could have adapted earlier) was because they were used to honourable duels, aka 1 on 1 combat, while the Mongols brought squad-based combat tactics.