Changing number of values on a field in installation profile
It's a field setting (cardinality), so assuming you're using field_create_field() to create it...

$field = array(
  'entity_types' =&gt; array('node'),
  'cardinality' =&gt; 2,
  'translatable' =&gt; FALSE,
  'locked' =&gt; FALSE,
  // etc...
);
field_create_field($field);


For unlimited values you can use the FIELD_CARDINALITY_UNLIMITED constant.