Should there be an option for users to turn the profile logging feature off for their profile?
I think I'll do this and I think the most sensible way would be to log visits in the same way XenForo logs visits to a HTML page. Clearly, this will add one query each time a profile is viewed, but the end result will be a database table that contains the user ID and number of visits their profile has received.
It should then be relatively simple to display the top 5 viewed profiles in the sidebar.
Sound good?