mongoose count methods refacored out to record.js