You have to select total quantity grouped by unique name.
Example:
select name, sum( qty ) as qty
from table_name
group by name
And, if you just want to count
the occurences, use count
select name, count( qty ) as qty
from table_name
group by name
But, based on your data, it seems SUM
is an appropriate to use.