The friends call does not contain the friend count. The XML contains:
<user xsi:schemaLocation="https://api.myspace.com/myspace.xsd">
<userid>8528142</userid>
<uri>http://api.msappspace.com/v1/users/8528142</uri>
<friends count="102">
but when the function returns the array you loose ...