I can see output from console.log('hello world') in the Output tab,
but not with console.log(db.collectionName.find({}).length)

UPDATE: I found a fix:
console.log(db.collectionName.find({}).toArray().length)