With the new mail categories, the badge is only showing a count of unread messages under the primary category.
Go to settings->notifications->mail->customize notifications and change under ‘badge count’ to ‘all unread messages’.
It was a mistake for Apple to enable these categories by default I believe. It’s a pretty drastic change and a lot of people are being confused by it.