Yes, there are leaky abstractions.
Query alone translates to a prepare call that compiles the SQL to a sqlite program (think bytecode). The program is not run.
To run a compiled sqlite program, one would use the step which either returns a result row, finihsed status code, or an error. In Android, you effectively run the program by calling one of the moveTo...()
methods on the returned cursor.
Getting cursor count is not directly supported by the sqlite C API. Android implements it by running the query and storing the results in a "cursor window" buffer. The same buffer is used for accessing the cursor's data later.