Pete's answer is the only solution I can think of that doesn't require coding, but it's only an option for Drupal users.
If you're on Joomla/Wordpress, you'll need to code a solution, or hire someone to do so. Create a custom field on the contact "number of relationships". Create an extension with civix
and use hook_civicrm_post
on any relationship being created/updated/deleted; use an API call to getcount
for relationships, and populate the number of relationships to your custom field.
If you know SQL but not PHP, an easier solution is to set up a cron job to fill in the custom field with a SQL statement that runs over the whole database. I'm not sure if you can use an UPDATE statement with a GROUP BY though - so you might need to use a subselect, which is expensive.
The other SQL-centric option is to create a trigger to handle this. You can be quick and dirty and drop it right into the database, or you can wrap it in a CiviCRM extension. If you go the latter route, consider coding it into the "Summary Fields" extension: https://civicrm.org/extensions/summary-fields