title: how to save the result of a query in a int variable?
body: <p>Hi I develop an application on android ADT. I am using sqlite to validate the registration. When the user registers are saved in a database and the database I want to check if a record already exists for the activity log is not open. This is the code that I used,  not shown error but does not function.</p>
  
  <pre><code>   public void onContinue(){
     AdminSQLiteOpenHelper admin = new AdminSQLiteOpenHelper(this,
              "pacman", null, 1);
      SQLiteDatabase bd = admin.getReadableDatabase();
  int total;
  Cursor c = bd.rawQuery("SELECT * FROM numeros", null);
      total = c.getCount();
      Intent nu;
  
  
      if(total == 1){
          nu = new Intent (this, ContactListActivity.class);
          startActivity(nu);
  
      } 
      else
           nu=new Intent(this, Bienvenido.class);
  startActivity(nu);
   finish();
   }
  </code></pre>