discord js channel count

JavaScript
<client>.channels.cache.size

// The client is the bot itself. 
// You would have defined this at the top of your index.js/app.js
// It would look like 'const client = new Discord.Client()'
// Put that in place for '<client>' and remove the <>
Source

Also in JavaScript: