Your first query has four columns in the select list, but the second image shows only two.
I am not able to discern exactly what you are looking for based on the screen shots. If you can visualize how SQL processes your request, you might be able to fix the problem yourself. To that end, suppose you have a query like shown below:
COUNT(*) AS Total
In this case, what SQL Server does is to walk through every row in you table, look at the values of username and groupname (the columns in the group by list), and put them into buckets that have the same username and groupname. Then, it counts the entries in each bucket and reports the count as the Total.
Given that, if you also add PhoneID to the select list, which then forces you to put PhoneID into the group by list, each bucket will have a unique combination of username, groupname and PhoneID. But there can be only one row in each of those buckets because PhoneID is the primary key, and by definition, there can be only one row in the table with a given PhoneID.
To put it another way, suppose you had only two rows in your entire table like shown below:
username = abu, phoneid = 100652, groupname = abcd
username = abu, phoneid = 222222, groupname = abcd
What is the output you are looking for in this case?