I've seen many many similar questions, but they all needed the ID of a specific guild to get the memberCount of that guild, not all the guilds. I want to find out how to get the memberCount of all the guilds that the bot is in. It'll be better if the memberCount isn't going to count the guilds' bots (however that I know how to make a filter for that).
As long as you don't want your bot to be verified and you don't use that data maliciously, it can be easily done:
Client.guilds.cache.forEach(guild => {
const members = guild.members.cache.filter(member => !member.user.bot);
console.log(guild.name + ': ' + members.size);
});
For this you'll need to have the GUILD_MEMBERS and GUILD_PRESENCES intents to work.