In the Anguttara Nikaya 7.35, the Buddha said this
“He gives what is beautiful,
hard to give,
does what is hard to do,
endures painful, ill-spoken words.
His secrets he tells you,
your secrets he keeps.
When misfortunes strike,
he doesn’t abandon you;
when you’re down & out,
doesn’t look down on you.
A person in whom these traits are found,
is a friend to be cultivated
by anyone wanting a friend.”
http://www.accesstoinsight.org/tipitaka/an/an07/an07.035.than.html
If one wants to have many friends, one should be a friend to many.
And one should have qualities of a friend worth associating with!