Can I update the flagged emails in Mail 10? After upgrading from Mavericks to Sierra, the flagged emails folder in Mail v.10.3 (3273) has been problematic. The folder shows 8 emails but I actually only have 3. I cannot find a way to update the folder so it only shows 3 flagged emails. Is there a way to do this? Thanks.
MacBook Pro (Retina, 15-inch, Late 2013), macOS Sierra (10.12.4), Time Capsule; AGT784WNV DSL Gateway
Two possible solutions…

Flagging conversations can be a bit confusing.


In Mail, go to the Flagged mailbox and click >> to expand conversations with flagged messages.
Flag/Unflag individual messages or entire conversations to suit.


If that's not the problem, common mailbox display problems can often be corrected by rebuilding mailbox indexes.  This can be done per mailbox with Mail's Mailbox > Rebuild command, but it can be simpler and quicker to force a rebuild for all mailboxes en masse by manually deleting the index files.

These instructions work for Sierra. Previous macOS versions had slightly different naming schemes within the Mail folder.


In Mail, choose Mail > Quit. 
In the Finder, choose Go > Go to Folder… and enter this path:

~/Library/Mail/V4/MailData/
Delete all files whose names begin with Envelope Index (e.g., Envelope Index, Envelope Index-shm, Envelope Index-wal, etc.)
Reopen Mail and when prompted, Continue to import your existing mailboxes.