Wrong attachment count

Hi All,

I’m trying to count the number of attachments of each email in a mailbox. First I have an imap reader generating a list of emails (var emaillist), then for each mail message (var item) in emaillist, I’ve asked uipath to count the number of attachments in each email via write line : item.attachment.count.toString

But sometimes it returns a wrong attachment count (eg. email with 3 attachments return attachment count of 1)
I am wondering if there is any syntax that may make the counting more accurate?

Attach your workflow…