Get the number of followers and following in user relationship
The following function works for me to display the count of friends a user have:

function mymodule_user_friends_count ($user) {
  $count = user_relationships_load(
    array("user" =&gt; $user-&gt;uid, 'approved' =&gt; 1, "name"=&gt;'Friend'), 
    array('count' =&gt; TRUE));
  return $count;
}


Notice I only count approved friends and only relationships of type 'Friend'