Count Transitions?
Count Transitions and apply a bit of common sense?
Common sense being if a transition takes someone into a building easily contained within the larger area it doesn't increase the 'distance'?
Otherwise you can have +3 areas detection mad useless by a few interior transitions within a single 'house' afterall..