Outlook script to get the number of emails in a mailbox fails

I have some souls left who archive their emails from Outlook. One has an Exchange account with an odd issue. Even though the script result is 0 emails the mailbox has a size of 6 GB. Below is the output of my app which can log AppleScripts, the properties and the results:

2025-10-13 14:34:00 RunAS.ExecuteScriptWithParameters script properties:
2025-10-13 14:34:00 RunAS.ExecuteScriptWithParameters {“Mailbox0":“Email2020”,“Mailbox1”:"xxx@xxx.com”}
2025-10-13 14:34:00 Script result:
2025-10-13 14:34:00 OutlookIterator.GetNumberOfEmails xxx@xxx.com:::Email2020 0
2025-10-13 14:34:00 RunAS.Constructor script text: property Mailbox0: “”
property Mailbox1: “”
with timeout of 10000 seconds
tell application “/Applications/Microsoft Outlook.app”
set theFolder to mail folder Mailbox0 of Exchange account Mailbox1
set NoOfMails to count every message of theFolder
Return NoOfMails
end tell
end timeout

Does anyone have an idea what might have gone wrong here? I have another script to get a list of mailboxes so I know that the mailbox with the name exists. The mailbox doesn’t have submailboxes.