title: iOS array count returning error
body: <p>I am trying to count my array to set as the number of rows in my table and then multiply it by 2 because I have an invisible cell in between each cell to make the cells look separated. Every time I try to build, I get this error:</p>
  
  <blockquote>
    <p>Terminating app due to uncaught exception 'NSRangeException', reason:
    '<em>*</em> -[__NSArrayM objectAtIndex:]: index 3 beyond bounds [0 .. 2]'</p>
  </blockquote>
  
  <p>This is the code I am using:</p>
  
  <pre><code>- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return [xmlParser.calls count] * 2; 
  }
  </code></pre>
  
  <p>cellForRowAtIndexPath:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {    
    static NSString *CellIdentifier = @"Cell";
    static NSString *CELL_ID2 = @"SOME_STUPID_ID2";
    JointCAD *currentCall = [[xmlParser calls] objectAtIndex:indexPath.row];
    self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"texture3.png"]];
  
    [self.tableView setSeparatorColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"texture3.png"]]];
  
    if (indexPath.row % 2 == 1) {
      UITableViewCell * cell2 = [tableView dequeueReusableCellWithIdentifier:CELL_ID2];
  
      if (cell2 == nil) {
        cell2 = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
                                         reuseIdentifier:CELL_ID2];
        [cell2.contentView setAlpha:0];
        [cell2 setUserInteractionEnabled:NO];
        [cell2 setBackgroundColor:[UIColor clearColor]];
      }
      return cell2;
    }
  
    TableViewCell *cell = (TableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  
    if (cell == nil) {
      cell = [[TableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    }
  
    cell.callTypeLabel.text = currentCall.currentCallType;
    cell.locationLabel.text = currentCall.location;
    cell.unitsLabel.text = currentCall.units;
    cell.stationLabel.text = [@"Station: " stringByAppendingString:currentCall.station];
    cell.contentView.layer.backgroundColor = [UIColor whiteColor].CGColor;
    cell.contentView.layer.frame = CGRectMake(0, 0, cell.contentView.frame.size.width, cell.contentView.frame.size.height);
    cell.contentView.layer.borderWidth = 1.0;
    cell.contentView.layer.borderColor = [UIColor blackColor].CGColor;
  
    if ([currentCall.county isEqualToString:@"W"]) {  
      cell.countyImageView.image = [UIImage imageNamed:@"blue.png"];
    } else {
      cell.countyImageView.image = [UIImage imageNamed:@"green.png"];
    }
  
    if ([currentCall.callType isEqualToString:@"F"]) {  
      cell.callTypeImageView.image = [UIImage imageNamed:@"red.png"];
    } else {
      cell.callTypeImageView.image = [UIImage imageNamed:@"yellow.png"];
    }
    return cell;
  }
  </code></pre>