perf(messages): caches unread messages count to reduce queries

Fixes #6942
Yea, since the unread count can be changed by someone else sending the message.