code: public static long queryNumEntries(SQLiteDatabase db, String table, String selection) {
          return queryNumEntries(db, table, selection, null);
      }
docs: Query the table for the number of rows in the table.
  @param db the database the table is in
  @param table the name of the table to query
  @param selection A filter declaring which rows to return,
  formatted as an SQL WHERE clause (excluding the WHERE itself).
  Passing null will count all rows for the given table
  @return the number of rows in the table filtered by the selection