Unit enters region, add unit to a group that filters out entering and exiting units.
Unit leaves region, remove unit from that group and check if unit is in the corresponding region.
If so, do your actions...
Let the events do the adding and removing of units in the group for you.