@Override
  public int getCount() {

    int count = 0;
    int sections = delegate.sectionCount();

    for (int i = 0; i < sections; i++) {
      count += delegate.rowsInSection(i);
    }

    return count + sections;
  }
  public IndexPath indexPathForPosition(int position) {
    IndexPath path = new IndexPath();

    for (int i = 0; i < delegate.sectionCount(); i++) {
      int rows = delegate.rowsInSection(i);

      if (position - rows - 1 >= 0) {
        position -= (rows + 1);
      } else {
        path.section = i;
        path.row = position - 1;
        return path;
      }
    }

    return path;
  }