View Source ExTDLib.Method.GetChatMessageCount (ExTDLib v0.0.4)

Returns approximate number of messages of the specified type in the chat. Returns object_ptr<Count>.

NameTypeDescription
chat_idstringIdentifier of the chat in which to count messages.
filterSearchMessagesFilterFilter for message content; searchMessagesFilterEmpty is unsupported in this function.
return_localboolPass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally.

More details on telegram's documentation.