How can I increase the number of allowed values on an image field?
You could also change the cardinality setting of your field instance without doing a direct query. The key function would be field_update_instance() and here is an example of how to modify your field: http://sivaji.drupalgardens.com/how-programmatically-change-field-instance-properties