Index: admin_menu.inc
===================================================================
--- admin_menu.inc	(revision 12)
+++ admin_menu.inc	(working copy)
@@ -175,13 +175,15 @@
     '#weight' => 100,
   );
   // Add link to show current authenticated/anonymous users.
-  $links['user-counter'] = array(
-    '#title' => admin_menu_get_user_count(),
-    '#description' => t('Current anonymous / authenticated users'),
-    '#weight' => -90,
-    '#attributes' => array('class' => array('admin-menu-action', 'admin-menu-users')),
-    '#href' => (user_access('administer users') ? 'admin/user/user' : 'user'),
-  );
+  if ( !variable_get('admin_menu_user_count', 0) ) {
+    $links['user-counter'] = array(
+      '#title' => admin_menu_get_user_count(),
+      '#description' => t('Current anonymous / authenticated users'),
+      '#weight' => -90,
+      '#attributes' => array('class' => array('admin-menu-action', 'admin-menu-users')),
+      '#href' => (user_access('administer users') ? 'admin/user/user' : 'user'),
+    );
+  }
   $links['account'] = array(
     '#title' => $GLOBALS['user']->name,
     '#weight' => -99,
@@ -230,6 +232,12 @@
     '#default_value' => variable_get('admin_menu_position_fixed', 0),
     '#description' => t('If enabled, the administration menu is always displayed at the top of the browser viewport (even after the page is scrolled). <strong>Note: In some browsers, this setting results in a malformed page, an invisible cursor, non-selectable elements in forms, or other issues. Disable this option if these issues occur.</strong>'),
   );
+  $form['admin_menu_user_count'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Hide user count'),
+    '#default_value' => variable_get('admin_menu_user_count', 0),
+    '#description' => t('If enabled, the number of users will not be count or shown. On sites with a large session database table this could prevent out of memory errors.'),
+  );
   $form['tweaks'] = array(
     '#type' => 'fieldset',
     '#title' => t('Advanced settings'),
