Move the media item counts function to new style with better error checking.
Change the user profile fetchers to new style
Switch over to the new user profile fetchers. Also remove last trace of global m for user profile.
Remove old functions