You can make 2 triggers.
Create one variable x
One trigger is to check when a unit enters the playabla map. When this happen add a condition to check the owning player, and set the variable to x + 1 and update the leaderboard with new value.
The second trigger check when a unit dies. Set x - 1 , update value on leaderboard.