public Integer getCounter(AccountIndex index) {
    Cursor cursor = getAccountCursor(index);
    try {
      if (!cursorIsEmpty(cursor)) {
        cursor.moveToFirst();
        return cursor.getInt(cursor.getColumnIndex(COUNTER_COLUMN));
      }
    } finally {
      tryCloseCursor(cursor);
    }
    return null;
  }
@return whether the database appears to be consistent with expectations or not
java/com/google/android/apps/authenticator/otp/AccountDb.java