I have a Macbook Pro 13" running El Capitan, purchased in February 2016. For the iMessage app, which I have saved in the Dock, the unread messages badge says there is one unread message and there's not. If I click and hold on the iMessage icon, it tells me which message is unread. And I have viewed all of the messages from that person. I tried quitting and reopening the app - that didn't fix it. I restarted my computer, and that does fix it, but the same issue arises again within a few days.
How can I fix this so the badge count is accurate?
I'm not great at using the Terminal. If you have a suggestion using the Terminal, please be very specific so I can replicate your suggestion easily.
EDIT: I just discovered that the badge count is wrong on the Messages app on my Mac if I have a text message (not an iMessage) unread on my iPhone.