select PRN.DeviceID0, Count(PRN.DeviceID0)
from dbo.v_GS_PRINTER_DEVICE PRN
Group by PRN.DeviceID0