We used to say that the number of the companions of the Messenger of Allah ﷺ on the day of Badr matched the number of the companions of Talut on the day they faced Jalut, three hundred and a few more, those who crossed the river with him. And none crossed the river with him except a believer.
حدثنا وكيع حدثنا أبي وسفيان وإسرائيل عن أبي إسحاق
كنا نتحدث أن عدة أصحاب رسول الله ﷺ كانوا يوم بدر على عدة أصحاب طالوت يوم جالوت ثلاث مائة وبضعة عشر الذين جازوا معه النهر قال ولم يجاوز معه النهر إلا مؤمن
Its isnad is sahih, and it is found in Bukhari 7/290, no. 3957, Fath al-Bari, in the book of military expeditions, chapter on the number of the companions who were present at Badr, and Tirmidhi 4/152, no. 1598, in the book of expeditions, with the same wording, and Ibn Majah 2/944, no. 2828, in the book of jihad, chapter on military detachments.