The Erdös number is determined by stringing together collaborators on published papers.
That is, Paul Erdös wrote a paper with Alan Hoffman, who wrote a paper with Joseph Kruskal, who wrote a paper with Mark Liberman, who wrote a paper with Ivan Sag, with whom I've written two papers. My Erdös number is of both the first kind and the second kind. Erdös numbers of the first kind are determined by coauthorship, allowing any number of coauthors on a paper. Erdös numbers of the second kind are determined by coauthorship on doubly authored papers only. I suppose we could also have Erdös numbers of the third kind, which are determined by just making shit up. In this case, my Erdös number of the third kind is 0.
Check out the Erdös Number Project Home Page, or read Erdös's biography, The Man Who Loved Only Numbers.