La respuesta de Axiumin es correcta pero eso requiere que tengas habilitados los intent.members.
Un ejemplo de cómo habilitarlo se puede hacer de la siguiente manera
intents = discord.Intents()
intents.all()
client = commands.Bot(command_prefix=".", intents=intents)
@client.event
async def on_ready():
await client.wait_until_ready()
await client.change_presence(activity=Activity(name=f".help en {len(client.users)} Usuarios", type=ActivityType.playing))
Tendrás que habilitarlo aquí. Selecciona la aplicación en la que deseas habilitarlo -> selecciona Bot
-> SERVER MEMBERS INTENT y asegúrate de que aparezca en azul junto a él. Luego haz clic en Guardar cambios. Como estás desarrollando tu bot, es posible que también quieras habilitar el intent de Presencia para ahorrarte tiempo más adelante.
Sin embargo, si tu bot no está permitido (si tu bot está en más de 100 servidores y discord rechazó su solicitud) puedes sortear esto haciendo:
@client.event
async def on_ready():
await client.wait_until_ready()
total_members = 0
for guild in client.guilds:
total_members += guild.member_count
await client.change_presence(activity=Activity(name=f".help en {total_members} miembros", type=ActivityType.playing))