Check whether multiple images are uploaded to a field?
You can get it done in a few lines using the field_get_items function:

if ($items = field_get_items('node', $node, 'field_name')) {
  if (count($items) == 1) {
    // ...
  }
  elseif (count($items) &gt; 1) {
    // ...
  }
}


It'd be best to keep this logic out of the template file itself and put it in a preprocess function though.