get_dialogs_count()

Client.get_dialogs_count()

Get the total count of your dialogs.

pinned_only (bool, optional):

Pass True if you want to count only pinned dialogs. Defaults to False.

Returns

int – On success, the dialogs count is returned.

Example

count = app.get_dialogs_count()
print(count)