SQL count(*) grouped by date range
You can use the APPLY operator to count the number of employees active at the termination date.  As I looked at the question at first I missed that there were different companies, so once I added AND company_id = pr.company_id to the query I get the result you are expecting.

SELECT * FROM #PersonnelRecord pr
OUTER APPLY (
    SELECT count(person_id) as person_count FROM #PersonnelRecord
    WHERE pr.exit_date &gt; entry_date 
        AND pr.exit_date &lt;= exit_date 
        AND company_id = pr.company_id
     ) a
ORDER by person_id