Get IMAP mail activity not getting the correct number of mails in the mail folder

Hi masters, please I have been facing the isuue of get IMAP mail activity not getting the mails, sometimes it gets incorrect number of mails from the mail box please what could be the issue. I am using mail.Count to check the number of mails. Cheers!