If you have old unread notifications and more than 25 read notifications, it is possible for the badge to show a positive number but the flyout/popup doesn't include any unread notifications.
Checked in betalabs - the notifications are sorted by their status and their timestamp. e.g. If #of notiifcations(read and unread) >25, unread notifications will be displayed on top of the list. If # of unread notifications >25, as soon as you click 'mark all as read', the unread notifications from the "next pages" will be displayed at the top.