title: Want to fetch all row and counts in Postgresql
body: <p>I have a table like this </p>
  
  <pre><code>|   ids   | name     |  status    |
  ----------------------------------
  |    1    | name1    |   true     |
  |    2    | name2    |   true     |
  |    3    | name1    |   true     |
  |    4    | name4    |   true     |
  |    5    | name1    |   false    |
  |    6    | name2    |   false    |
  |    8    | name1    |   false    |
  |    9    | name1    |   true     |
  |    10   | name1    |   false    |
  |    11   | name1    |   false    |
  </code></pre>
  
  <p>I want to fetch the row <code>where (name = name1 or name2) and count</code> of all true status(for eg. in the table total_true_count=4 [ie. all row of these ids ids=1,2,3,9]  ) and all false status(for eg. in the table total_false_count=5  ie. [all row of these ids=5,6,8,10,11] ) of the selected row.</p>
  
  <pre><code>Output will be like this
  
  $output=Array
                  (
                      [total_true_count] =&gt; 4,
                      [total_false_sms] =&gt; 5,
                      [row_data]=&gt;{row1,row2....}
                  )
  </code></pre>
  
  <p>I tried count function but it not working for me. can anyone please help</p>