Pass in a callback function:
var emailExists = function (email, _callback) {
mongoose.model('User', UserSchema).
count({
email: email
}, _callback);
};
Then access the variable as follows:
emailExists(email, function(err, total) {
console.log(total);
});