'Number of fields in the array'

def __len__(self):

    total = (self._max_index + 1)
    if (not self._known_size):
        for index in itertools.count(total):
            try:
                field = self[index]
                total += 1
            except MissingField:
                break
    return total
