If the system sees someone exit a building and that person does not match someone the system saw enter the building, the person could be flagged and tracked as possibly being someone else who entered the building. Once the system accounts for everyone else who entered the building (by seeing when they exit), the system would be able to correlate that the unknown person who exited is the same as the only unaccounted for person who exited
If that building in an apartment building? Someone from an apartment building might not enter before leaving on the same day. How far back in the camera's history does the system look for that person entering?