Using fs, I found retrieving the directory file count to be straightforward.
const fs = require('fs');
const dir="./directory";
fs.readdir(dir, (err, files) => {
console.log(files.length);
});
For the TS enthusiasts:
fs.readdir(dir, (err: NodeJS.ErrnoException | null, files: string[]) => {
console.log(files.length);
});