וַיִּפְנ֞וּ וַיָּנֻ֤סוּ הַמִּדְבָּ֙רָה֙ אֶל־סֶ֣לַע הָֽרִמּ֔וֹן וַיְעֹֽלְלֻ֙הוּ֙ בַּֽמְסִלּ֔וֹת חֲמֵ֥שֶׁת אֲלָפִ֖ים אִ֑ישׁ וַיַּדְבִּ֤יקוּ אַחֲרָיו֙ עַד־גִּדְעֹ֔ם וַיַּכּ֥וּ מִמֶּ֖נּוּ אַלְפַּ֥יִם אִֽישׁ׃
And they turned and fled toward the wilderness unto the rock of Rimmon; and they gleaned of them in the highways five thousand men; and followed hard after them unto Gidom, and smote of them two thousand men.
Rashi on Judges
They gleaned them. Killing constantly, like plucking gleanings after reaping.
Rashi on Judges
Five thousand troops. Thus totaling twenty three thousand.