rem: int count = array->size() - 1;
add: int count = array.size() - 1;
context:   int getRealSize()  {    int count = array->size() - 1;    while (count >= 0) {      if (array->at(count))        break;      count--;    }    return count + 1;  }