title: SQL count rows with same value in column and group by id?
body: <p>i have a table like this:</p>
  
  <pre><code>id  | value
  1   |   1
  2   |   1
  3   |   2
  4   |   3
  </code></pre>
  
  <p>i wonder if its possible to count the rows with same value and group them by id , but every time the code will return count 1 if i group them by id and not by value</p>
  
  <p>wanted output:</p>
  
  <pre><code>id  | count
  1   |   2(there are 2 rows with value 1)
  2   |   2
  3   |   1
  4   |   1
  </code></pre>