I have for some time had two email accounts set up as IMAP on my Galaxy S9 phone viw the Samsung email app. Generally they have worked well for over 3-4 years now. About 2 weeks ago one of the accounts (my main one) started alternating between saying there were no emails in my inbox (there are loads) and showing the correct number including new ones - it usually says it has synched in the last few minutes.
I've even had a couple of times when as I clicked on a new mail the inbox emptied, they then come back some time later without any clue to when. If I access the mail through my computer (Outlook) or via webmail the inbox has the correct number
my other email account (different provided) doesn't exhibit these problems - it's annoying as I need access to email when I need it not when it decides oit want's to work!