如何创建MYSQL查询以获取特定结果(计算一列中的所有唯一值)

Please look at my table's structure:

-------------
| id | name |
-------------
| 1  |  a   |
| 2  |  a   |
| 3  |  a   |
| 4  |  b   |
| 5  |  b   |
| 6  |  c   |
| 7  |  d   |
| 8  |  d   |

I would like to create a query (in PHP), to get such results (in HTML):

<p>name: a (number of letters: 3)</p>
<p>name: b (number of letters: 2)</p>
<p>name: c (number of letters: 1)</p>
<p>name: d (number of letters: 2)</p>
SELECT count(name),
       name 
  FROM MyTable 
  GROUP BY name 
  ORDER BY name ASC;

I assumed your table is named MyTable exchange it accordingly.