This commit clarifies the intended usage of message_count and
last_message. Additionally it changes the only usage of message_count
to using last_message instead, bringing the code further along the
intended usage.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19599 | core#19599]]