Calculate count of 'Friend' Relationship from key-value paired data of social network