This is a simple solution to a frustrating problem. In the Apple Mail app I have a folder that says Flagged. It’s not something you can throw away. It just appears if you have flagged messages and lists them for you.
That’s how is supposed to work. But for several weeks that folder was there and it said I had six messages. (By the way, this has nothing to do with the new operating system. The problem existed before I undated to Yosemite.) Every time it caught my eye I thought I had new mail. The folder was empty. I searched for flagged messages so I could unflag them and found nothing. It was really getting to me.
I consulted a friend for an answer and this is what worked. I opened every folder in mail one at a time. Be sure to do every one. I used Command A to select them all. Again, be sure to do it this way. Then I flagged every one and immediately unflagged every one. By the time I finished the Flagged folder had disappeared from the folder list in Mail.
This trick will also work if you have messages marked as unread when you have read them already. To work with this problem do the select all and then select Message > Mark.
Now I can move onto really important stuff, like lunch.