title: number of tables in a database (android)
body: <p>I use Count_tables method  for count the number of tables in database but always return one.</p>
  
  <pre><code>@Override
  public void onCreate(SQLiteDatabase db) {
  
  
      db.execSQL("CREATE TABLE abb1  ( _ID  INTEGER PRIMARY KEY,name  TEXT )");
      db.execSQL("CREATE TABLE abb2  ( _ID  INTEGER PRIMARY KEY,name  TEXT )");
      db.execSQL("CREATE TABLE abb3  ( _ID  INTEGER PRIMARY KEY,name  TEXT )");
  }
  
  
  public int Count_tables(){
      int count = 0;
      String SQL_GET_ALL_TABLES = "SELECT count(*) FROM sqlite_master WHERE type = 'table' AND name != 'android_metadata' AND name != 'sqlite_sequence'";
      Cursor cursor = getReadableDatabase()
              .rawQuery(SQL_GET_ALL_TABLES, null);
  
      return cursor.getCount();;
  
  }
  </code></pre>