Get the total count of messages in a chat.
Due to Telegram latest internal changes, the server can’t reliably find anymore the total count of messages a private or a basic group chat has with a single method call. To overcome this limitation, Pyrogram has to iterate over all the messages. Channels and supergroups are not affected by this limitation.
str) – Unique identifier (int) or username (str) of the target chat.
int– On success, the chat history count is returned.