Avoid double query on the same table
The new 9.5 version has added CUBE, GROUPING SETS and ROLLUP extensions to GROUP BY which can be used for such queries. If you have to do this in previous versions, one way is using a CTE, with something like (note that it's not the same exact output as your query, since I didn't know the type of created_at. I guess it's a timestamp and didn't want to mix it with the integer count):

WITH grp AS
  ( SELECT key_id,
           sum(salary) AS salary,
           sum(bonus)  AS bonus,
           created_at,
           count(*)    AS full_count
    FROM table
    WHERE emp_id = 1
    GROUP BY key_id, created_at
  )
SELECT *
FROM grp

UNION ALL

SELECT key_id, 
       sum(salary),
       sum(bonus), 
       NULL,
       sum(full_count)   
FROM grp
GROUP BY key_id 

ORDER BY key_id, created_at NULLS LAST;