code: public static int count(Cursor cursor, boolean close) {
          int count = cursor.getCount();
          close(cursor, close);
          return count;
      }
docs: Get the number of rows in the cursor.
  
  @param close true to close the cursor or false to leave it open