G-d promises the Israeli Nation that (Lev 26,6):
וְרָדְפוּ מִכֶּם חֲמִשָּׁה מֵאָה, וּמֵאָה מִכֶּם רְבָבָה יִרְדֹּפוּ
וְנָפְלוּ אֹיְבֵיכֶם לִפְנֵיכֶם לֶחָרֶב׃
Five of you shall give chase to a hundred, and a hundred of you shall give chase to ten thousand;
your enemies shall fall before you by the sword.
According to the number of asses or little girls captured I estimate the number of Midianites to ca. 50,000 (there were 60,000 asses and 30,0000 girls, roughly one per family).
That would require 50,000/100 = 500, so only around 500 Israelites were needed to wipe them out completely. As all the sinners with Baal peor were already killed I presume that the rest were pious and the Blessing should have been fulfilled.
Why then, did Moses require 12,000 Israelites in Bamidbar 31,4-5 to wage war on the Midianites?