Relate number of values to an integer field
You will probably have to setup some way of two step process to enable the reference between both nodes (maybe entityreference). The field you are using will have to be an unlimited multi value field.

with this peace of code you will be able to reduce the items of that field (including the add button). Feel free to provide any other logic for looking up the settings node / proding a default limit etc.

&lt;?php
function mymodule_field_attach_form($entity_type, $entity, &amp;$form, &amp;$form_state, $langcode) {
  if ($entity_type == 'node' &amp;&amp; $entity-&gt;type == 'my_content_type') {
    $multi_values = array();
    foreach ($form['field_myfield'][LANGUAGE_NONE] as $key =&gt; $value) {
      if (is_numeric($key)) {
        $multi_values[$key] = $value;
      }
    }

    if (count($multi_values) &gt; 1) {
      $multi_value_keys = array_keys($multi_values);
      foreach ($multi_value_keys as $key) {
        unset($form['field_myfield'][LANGUAGE_NONE][$key]);
      }

      // get the count of the asociated node, maybe using entity reference?
      $settings_node = node_load($entity-&gt;field_settings_node[0][LANGUAGE_NONE]['target_id']);
      if ($settings_node) {
        $limit = $settings_node-&gt;field_limiting_field[LANGUAGE_NONE][0]['value']; // e.g. textfield..
        if ($limit) {
          $i = 0;
          // add all the fields that are allowed, cut of the once that are too much (and remove the add button)
          while ($i &lt; $limit &amp;&amp; $i &lt; count($multi_values)) {
            $form['field_myfield'][LANGUAGE_NONE][$i] = array_shift($multi_values);
            $i++;
          }
        }
      }
    }
  }
}


You might also want to look at How to dynamically set the maximum cardinality for a multi value field? for another example (setting the access attribute for those fields)