Jabir told that God’s Messenger used to keep to the rear when traveling and urge on the weak. He would take someone up behind him and would make supplication for them all.
Ibn ‘Abbas reported the Prophet as saying, "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."
Tirmidhi, Abu Dawud and Darimi transmitted it, Tirmidhi saying this is a gharib tradition.
Abu Tha'laba al-Khushani said that when the people encamped they scattered in the glens and wadis, but when God’s Messenger said, “Your scattering in these glens and wadis is only of the devil," they afterwards kept close together when they encamped to such an extent that it used to be said that if a cloth were spread over them it would cover them all.