I've known several individuals who continually announce that they "have no friends" when, in fact, I know otherwise. I've seen the amount of attention their friends offer them, and have witnessed some pretty impressive sacrifices their friends have made for them. My own assessment has been that the "I have no friends" contingent simply like to be identified with the self-sufficient loner, and are proud (in a dysfunctional way) of being friendless (even though that's not accurate). They often like to point out how they are independent and how they are not followers, and the "friendless" folks consider this a point of pride -- even though it's something of an affectation.
Interestingly, many of the people I've known who fit into this category are prone to self-sabotage. They often fear failure and success, including social success, and they fear committed relationships. As such, they deliberately sabotage their social life as well. That way, they can blame their lack of success on their own deliberate actions, rather than committing to succeeding only to fall short (in which case they'd have to take responsibility for the failure). They can blame their aloofness and inability to maintain healthy relationships on the fact they choose not to have friends (or not to label people in their life as such).
I've also seen some very emotionally-needy people claim they have no friends. It's a way of putting down those very people who are there for them and playing the part of the victim. Similar to the "proud loner" type I mention above, these individuals are unable to cope with the concept they might be responsible for any shortcomings in their life -- so they continually blame others (or the absence of them). Eventually, by not giving credit or appreciation to their very real friends, the friends get worn out and fade away -- creating a self-fulfilling prophecy.
Forming strong and healthy friendships is one of the most meaningful and important things we can do for ourselves and for others. It's a shame there are so many people who consider it a point of pride to avoid doing exactly that.