How to display the replies count of the each user comments with show/hide option in node view page in Drupal 7? Now, I am having comments section like this in node view page.

  Comment 1
    comment 11
    comment 12
  Comment 2
  Comment 3
    comment 31
    comment 32
    comment 33


But, I would to show this with show/hide option for replied comments with replies count. like below


  Comment 1
    show/hide 2 replies
    ------------------
    | comment 11     |
    | comment 12     | 
    ------------------
  Comment 2
  Comment 3
    show/hide  3 replies
    ---------------
    |  comment 31 |
    |  comment 32 |
    |  comment 33 |
    ---------------
I tried to solve your problem . The best way to solve this is to create a new CUSTOM MODULE.
 - Create a new folder in Your sites/all/modules folder custom_module name could be anything.


In folder create two files custom_module.info and custom_module.module and  a folder js . In that folder create a .js file custom_module.js .
So now you .js file will be located at sites/all/modules/custom/js/custom_module.js . Now Go to custom_module folder and in custom_module.info file add the lines of code..

name = Custom_module
description = Displays total count of replies to a comment and add display toggler to the replies of the comment.
core = '7.x'
version = '7.x-1.x'
dependencies[] = comment

Now in your  custom_module.module file

&lt;?php
drupal_add_js(drupal_get_path('module','custom_module') '/js/custom.js');
function custom_module_preprocess_comment(&amp;$variables) {
  $query = db_query('SELECT COUNT(*) FROM comment WHERE pid = :cid', array(':cid' =&gt; $variables['id'])) ;
  $result = $query-&gt;fetchField();
  $variables['content']['links']['comment']['#links']['comment-reply']['title'] = 'reply &lt;/a&gt; &lt;span&gt;('.$result.')&lt;/span&gt; &lt;span id="show-hide"&gt;Show&lt;/span&gt;';
}

So what the module did is fetched the total no of replies of a comment from the database and appended them to reply link.
A Simple jQuery file will get you what you wanted. Edit your js/custom_module.js file custom_module.js file

(jQuery)(document).ready( function() {
  jQuery('div.indented').css('display', 'none');
  (jQuery)('div.comment .comment-text ul li.comment-reply span').click( function() {
    if(jQuery('show-hide').html()=='Show') {
      jQuery('show-hide').html()='Hide';    
      (jQuery)(this).parents("div.comment").next().slideToggle();
    }
    else {
      jQuery('show-hide').html()='Show';
      (jQuery)(this).parents("div.comment").next().slideToggle();
    }
  });
})(jQuery); 

Click On Show in Comments and it will toggle . I have also added a screenshot..


SHOW
.

HIDE