What is the equivalent of sess_count in Drupal 7
drupal_session_count() was removed from Drupal 7. I'm not sure what an equivalent would be other than writing your own function.

Looks like the user block has it's own query. And admin menu had to replace it too.