Restructure create and delete events on rows into single table
No restructure is needed.  (Or I don't understand why there might need to be a restructure.)

SELECT  object,
        SUM(type = 'create') - SUM(type = 'delete') AS remaining_ct
    FROM tbl
    GROUP BY object;


This assumes that 'creates' occur before 'deletes'.