You do not need to create another module, simply create a new line item called Headcount in the model with dept and employees as dimensions. However, add the dimension of month to this line item in the time scale option.
The following formula should work:
IF PERIOD(Join Date) <= ITEM(Time) AND PERIOD(Leave Date) >= ITEM(Time) THEN 1 ELSE 0
If you need to display this in a dashboard, simply hide the employees dimension and lock it to all employees. The same is used in Lowe employee management portal Myloweslife to allocate resources and employees.
Anaplan is a very flexible platform so the answer to that really depends on what you want to do with the numbers carry by the people. save the costs/revenue in the previous position ? transfer them in the new one ? have both ?