There are a few things I'd like to point out here. First of all, the code you've posted can be simplified dramatically using array literals.
NSMutableArray *array1 = [@[@"1",@"2",@"3"] mutableCopy];
NSMutableArray *array2 = [@[@"A",@"B",@"C",@"D"] mutableCopy];
NSMutableArray *array3 = [@[@"AA",@"BB",@"CC"] mutableCopy];
NSMutableArray *masterArray = [@[array1,array2,array3] mutableCopy];
Then theres the matter of your naming of MasterArray. In Objective-C, it's common to use lowerCamelCase formatting for instances, and UpperCamelCase for classes. Conforming to this style will help improve your code's readability.
Now, on to your actually problem. If you can get the count of an array just by accessing its count property, then there's no reason why you need a named variable specifically to access the array. Consider the following two implementations to access the count of the first sub array within an array. They both do the same thing:
NSArray *arr = @[subArray1,subArray2,subArray3];
NSArray *sub1 = arr[0];
NSUInteger countOfSub1 = sub1.count;
NSArray *arr = @[subArray1,subArray2,subArray3];
NSUInteger count = [arr[0] count];
So then if you want to get the count of every sub array in the master array, you can achieve the same thing inside a loop.
for(NSMutableArray *subArray in masterArray) {
NSUInteger count = subArray.count;
}
NSArray* array = @[@"1", @"2", @"3"];This is called anarray literal