What is the orphaned mail report and how does MessageStats process the information?
An orphaned mailbox is defined as a mailbox that has physical resources associated with it, but no user can be found in Active Directory.
In the current mailbox gathering, a listing of the contents of the store is enumerated through. These objects are the mailboxes. If the user context is not found, the returned mailbox record is flagged with a Gathering Status = 1 (indicates an orphan mailbox). Therefore, if a mailbox is deleted, the mailbox retention feature will actually keep the mailbox in the store. Once that period is exceeded, then the mailbox is truly deleted.
As for how the MessageStats will consider the mailbox, while the mailbox is in the retention period, it is still an object in the store, and it is not returned in the mailbox gathering. However, the main account is not associated to a mailbox and it is now considered an orphan at this point. Once the mailbox is truly deleted, it will simply be gone and not show up in the Orphaned Mailboxes report.