DBInterface is exported from SQLite.jl, so you could do:
counts = first(first(DBInterface.execute(db, "SELECT COUNT(*) FROM t")))
you could also define this as a local function in our app/script if you’ll re-use it a lot:
count(db, tbl) = first(first(DBInterface.execute(db, "SELECT COUNT(*) FROM $tbl")))