The only real limit to the number of rows is the maximum file size of the operating system, or the size of your hard disk. These days even those limits can be overcome through linked tables and distributed databases and clustered servers.
How many columns? How long is a piece of string. You decide on what data you need to store and then create the columns for them. If the table gets too wide then you can split off the less significant columns into another table.
You definitely have a contacts table. Whoever initiates the contact/friend relationship goes in the first column and the other person goes in the second. Some of these sites will also have additional columns to control things like whether the second person agrees, whether the relationship is visible, etc. You'll think of them as you go along.
If you want to store more complex relationships then google for 'storing hierarchical data' and you will find the design and queries already worked out for you (there is an article here somewhere). If you don't know a lot about databases though then you will find it hard going.
Never ever contemplate using a comma separated list in 1 column, even if other people tell you to. The problems and complexities that will lead to are to be avoided at all costs. There are only a very few special cases where that is the correct way to store the data.