Below is my code.i need to get the total length of two collections in single variable.
audiofiles.find(),function(err,res){
console.log(res.length);
var count1 = res.length;
}
videofiles.find(),function(err,res){
console.log(res.length);
var count2 = res.length;
}
var totalcount = parseInt(count1+count2);
console.log(totalcount);
via Jagadeesh