How to check how many people have a role using discord.js?

Role#members itself returns a Collection<Snowflake, GuildMember>, so just use

bots.members.size

and it should work.

https://discord.js.org/#/docs/main/stable/class/Role?scrollTo=members