Sahih Muslim 4812
The Book on Government
وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، وَابْنُ، بَشَّارٍ قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، عَنْ عَمْرِو بْنِ مُرَّةَ، عَنْ سَالِمِ بْنِ أَبِي الْجَعْدِ، قَالَ سَأَلْتُ جَابِرَ بْنَ عَبْدِ اللَّهِ عَنْ أَصْحَابِ، الشَّجَرَةِ فَقَالَ لَوْ كُنَّا مِائَةَ أَلْفٍ لَكَفَانَا كُنَّا أَلْفًا وَخَمْسَمِائَةٍ .
It has been narrated on the authority of Salim b. Abu al-Ja'd who said:I asked Jabir b. 'Abdullah about the number of the Companions (of the Prophet who took the oath of fealty under) the tree. He said: If we were a hundred thousand, it (i. e. the water in the well at Hudaibiya) would have sufficed us, but actually we were one thousand and five hundred
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.