SELECT COUNT(*) Qty FROM (SELECT host_nameFROM sys.dm_exec_sessionsWHERE ISNULL(host_name,'')<>''GROUP BY host_name) t