Volume 4, Book 52, Number 293 :
Narrated by Hudhaifa (radiallaahu `anhu)
The Prophet (sallallaahu `alayhi wasallam) said (to us), ” List the names of those people who have announced that they are Muslims.” So, we listed one thousand and five hundred men. Then we wondered, “Should we be afraid (of infidels) although we are one thousand and five hundred in number?” No doubt, we witnessed ourselves being afflicted with such bad trials that one would have to offer the prayer alone in fear.
This count was done for either Uhud or before digging the Trench or at Hudaibiyah, according to the commentary. It was just a reassurance for Muslims and a confidence booster. Ultimately, all help is from Allah, as was proved in Badr, but having that advantage of number certainly helps.
Volume 4, Book 52, Number 294 :
Narrated by Al-A`mash (radiallaahu `anhu)
“We (listed the Muslims and) found them five hundred.” And Abu Muawiya (radiallaahu `anhu) said, “Between six-hundred to seven-hundred.”
It was the time for prayer, and those whose houses were near got up and went to their people (to perform ablution), and there remained some people (sitting). Then a painted stove pot (Mikhdab) containing water was brought to Allah’s Apostle. The pot was small, not broad enough for one to spread one’s hand in; yet all the people performed ablution. (The sub narrator said, “We asked Anas, ‘How many persons were you?’ Anas replied ‘We were eighty or more”). (It was one of the miracles of Allah’s Apostle).
It was BARAKAH! Doesn’t seem logical, but it’s true. :)