Index: program/include/main.inc
===================================================================
--- program/include/main.inc	(revision 2)
+++ program/include/main.inc	(working copy)
@@ -1405,7 +1405,7 @@
  */
 function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $attrib, $nestLevel=0)
 {
-  global $RCMAIL, $CONFIG;
+  global $RCMAIL, $CONFIG, $IMAP;
   
   $maxlength = intval($attrib['maxlength']);
   $realnames = (bool)$attrib['realnames'];
@@ -1457,6 +1457,7 @@
 
     $collapsed = preg_match('/&'.rawurlencode($folder['id']).'&/', $RCMAIL->config->get('collapsed_folders'));
     $unread = $msgcounts ? intval($msgcounts[$folder['id']]['UNSEEN']) : 0;
+    $all = $IMAP->messagecount($folder['id']);
     
     if ($folder['virtual'])
       $classes[] = 'virtual';
@@ -1464,7 +1465,7 @@
       $classes[] = 'unread';
 
     $js_name = JQ($folder['id']);
-    $html_name = Q($foldername . ($unread ? " ($unread)" : ''));
+    $html_name = Q($foldername . ($unread ? " ($unread/$all)" : " ($all)"));
     $link_attrib = $folder['virtual'] ? array() : array(
       'href' => rcmail_url('', array('_mbox' => $folder['id'])),
       'onclick' => sprintf("return %s.command('list','%s',this)", JS_OBJECT_NAME, $js_name),
Index: program/js/app.js.src
===================================================================
--- program/js/app.js.src	(revision 2)
+++ program/js/app.js.src	(working copy)
@@ -255,6 +255,7 @@
         // get unread count for each mailbox
         if (this.gui_objects.mailboxlist) {
           this.env.unread_counts = {};
+          this.env.all_counts = {};
           this.gui_objects.folderlist = this.gui_objects.mailboxlist;
           this.http_request('getunread', '');
         }
@@ -4737,6 +4738,14 @@
     this.set_unread_count_display(mbox, set_title);
   };
 
+  this.set_all_count = function(mbox, count)
+  {
+    if(!this.gui_objects.mailboxlist)
+	  return false;
+
+    this.env.all_counts[mbox] = count;
+  };
+
   // update the mailbox count display
   this.set_unread_count_display = function(mbox, set_title)
   {
@@ -4744,6 +4753,7 @@
 
     if (item = this.get_folder_li(mbox)) {
       mycount = this.env.unread_counts[mbox] ? this.env.unread_counts[mbox] : 0;
+      allcount = this.env.all_counts[mbox] ? this.env.all_counts[mbox] : 0;
       text_obj = item.getElementsByTagName('a')[0];
       reg = /\s+\([0-9]+\)$/i;
 
@@ -4756,12 +4766,10 @@
             childcount += this.env.unread_counts[k];
       }
 
-      if (mycount && text_obj.innerHTML.match(reg))
-        text_obj.innerHTML = text_obj.innerHTML.replace(reg, ' ('+mycount+')');
-      else if (mycount)
-        text_obj.innerHTML += ' ('+mycount+')';
+      if (mycount)
+        text_obj.innerHTML = text_obj.innerHTML.replace(reg, ' ('+mycount+'/'+allcount+')');
       else
-        text_obj.innerHTML = text_obj.innerHTML.replace(reg, '');
+        text_obj.innerHTML = text_obj.innerHTML.replace(reg, ' ('+allcount+')');
 
       // set parent's display
       reg = new RegExp(RegExp.escape(this.env.delimiter) + '[^' + RegExp.escape(this.env.delimiter) + ']+$');
Index: program/steps/mail/folders.inc
===================================================================
--- program/steps/mail/folders.inc	(revision 2)
+++ program/steps/mail/folders.inc	(working copy)
@@ -66,6 +66,7 @@
                 $OUTPUT->set_env('pagecount', 0);
                 $OUTPUT->command('message_list.clear');
                 $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text());
+                $OUTPUT->command('set_all_count', $mbox, $IMAP->messagecount($mbox));
                 $OUTPUT->command('set_unread_count', $mbox, 0);
                 $OUTPUT->command('set_quota', rcmail_quota_content());
                 rcmail_set_unseen_count($mbox, 0);
Index: program/steps/mail/func.inc
===================================================================
--- program/steps/mail/func.inc	(revision 2)
+++ program/steps/mail/func.inc	(working copy)
@@ -489,8 +489,12 @@
   else
     $unseen = $count;
 
+
   if ($unseen != $old_unseen || ($mbox_name == 'INBOX'))
+  {
+    $RCMAIL->output->command('set_all_count', $mbox_name, $RCMAIL->imap->messagecount($mbox_name));
     $RCMAIL->output->command('set_unread_count', $mbox_name, $unseen, ($mbox_name == 'INBOX'));
+  }
 
   rcmail_set_unseen_count($mbox_name, $unseen);
 
Index: program/steps/mail/getunread.inc
===================================================================
--- program/steps/mail/getunread.inc	(revision 2)
+++ program/steps/mail/getunread.inc	(working copy)
@@ -36,6 +36,7 @@
       $unseen = $IMAP->messagecount($mbox_row, 'UNSEEN', $unseen_old === null);
 
     if ($unseen || $unseen_old === null) {
+      $OUTPUT->command('set_all_count', $mbox_row, $IMAP->messagecount($mbox_row));
       $OUTPUT->command('set_unread_count', $mbox_row, $unseen, $inbox && $mbox_row == 'INBOX');
     }
 
Index: program/steps/mail/mark.inc
===================================================================
--- program/steps/mail/mark.inc	(revision 2)
+++ program/steps/mail/mark.inc	(working copy)
@@ -101,6 +101,7 @@
       $old_unseen = rcmail_get_unseen_count($mbox);
 
       if ($old_unseen != $unseen_count) {
+        $OUTPUT->command('set_all_count', $mbox, $IMAP->messagecount($mbox));
         $OUTPUT->command('set_unread_count', $mbox, $unseen_count, ($mbox == 'INBOX'));
         rcmail_set_unseen_count($mbox, $unseen_count);
       }
Index: program/steps/mail/move_del.inc
===================================================================
--- program/steps/mail/move_del.inc	(revision 2)
+++ program/steps/mail/move_del.inc	(working copy)
@@ -112,6 +112,7 @@
   $old_unseen = rcmail_get_unseen_count($mbox);
 
   if ($old_unseen != $unseen_count) {
+    $OUTPUT->command('set_all_count', $mbox, $IMAP->messagecount($mbox));
     $OUTPUT->command('set_unread_count', $mbox, $unseen_count, ($mbox == 'INBOX'));
     rcmail_set_unseen_count($mbox, $unseen_count);
   }
