The Prophet ﷺ said: The best number of companions is four, the best number in expeditions four hundred, and the best number in armies four thousand; and twelve thousand will not be overcome through smallness of numbers. Abu Dawud said: What is correct is that this tradition is mursal (i.e. the link of the Companion is missing).
عَنِ النَّبِيِّ ﷺ قَالَ خَيْرُ الصَّحَابَةِ أَرْبَعَةٌ وَخَيْرُ السَّرَايَا أَرْبَعُمِائَةٍ وَخَيْرُ الْجُيُوشِ أَرْبَعَةُ آلاَفٍ وَلَنْ يُغْلَبَ اثْنَا عَشَرَ أَلْفًا مِنْ قِلَّةٍ