title: How to determine the index number of the last object in a NSMutable Array
body: <p>I have a NSMutable Array and was trying to find the index number of the last object in this array. I tried this, but it feels cumbersome:</p>
  
  <pre><code> int currentCount = [[[self.myLibrary objectAtIndex:currentNoteBookNumber] tabColours] count];
      NSLog(@"Number of tab colours total: %i", currentCount);
  NSLog(@"Index number of last object: %i", currentCount-1);
  </code></pre>
  
  <p>Is there another way of doing this? The context of my problem is that I need to determine the last object in order to change it:</p>
  
  <pre><code>replaceObjectAtIndex:[last object] withObject: ...
  </code></pre>
  
  <p>Thanks!</p>