code: function makeCountNCallback(n, cb) {
          var count = 0,
              results = [],
              error;
          return function(index, err, result) {
              results[index] = result;
              if (!error && err) {
                  error = err;
                  return cb(err);
              }
              if (!error && ++count == n) {
                  cb(null, results);
              }
          };
      }
docs: Create a function that will call a callback after n function calls