This here document:
https://dod.defense.gov/Portals/1/Documents/pubs/DoD%20Law%20of%20War%20Manual%20-%20June%202015%20Updated%20Dec%202016.pdf?ver=2016-12-13-172036-190
is some damned fine readin'.
How many troops per square mile (or similar) constitutes "occupation exists in fact" ?