I have been frustrated with the mail app badge count never being correct, nor updating. Today I may have figured out how to fixed it. Since apple added categories, which I don’t care for and have turned off, it has not worked. Go to SETTINGS, NOTIFICATIONS, MAIL, CUSTOMIZE NOTIFICATIONS AT THE BOTTOM OF SCREEN, and my settings had only the “unread message in primary” checked off. I changed that to “All unread messages” and it works perfectly so far.