Refactor computed property "messagesCount"