Performing SQL counts with and without a WHERE clause from the same table
You can do the following for SQL Server:
SELECT DeviceOS                  AS DeviceOS
     , COUNT(*)                  AS TotalCount
     , SUM(IIF(Bytes &lt; 0, 1, 0)) AS BadCount
FROM (
         VALUES ('Roku', 10000)
              , ('AppleTV', -50000)
              , ('SamsungTV', -100000)
              , ('Roku', -100000)
              , ('AppleTV', 30000)
              , ('Roku', -90000)
              , ('AppleTV', -20000)
              , ('AppleTV', -10000)
              , ('SamsungTV', -100000)
     ) AS t1 (DeviceOS, Bytes)
GROUP BY DeviceOS

We are grouping by the DeviceOS column and getting the Name and the Count.
The only tricky part is using SUM(IIF(Bytes &lt; 0, 1, 0)) AS BadCount to get the bad count.
What this does is it checks if the byte size is less than 0 (meaning it is negative):

if it is, then +1 is added to the sum
if it is not, then +0 is added to the sum