Welcome! Please see the About page for a little more info on how this works.
Currently there is no built in way to limit the results from a query. This puts the task on the user to limit the results by first querying for entity ids, limiting that number and then pulling the data.
If you use the map-args of q (https://docs.datomic.com/client-api/datomic.client.api.html#var-q), you can both limit and offset the results:
q
(d/q '{:query '{:find [?id} :in [$] :where [[_ :ent/id ?id]]} :args [db] :limit 100 :offset 35 :timeout 60000})
limit - limit the number of results offset - skip some results timeout - milliseconds before giving up
If you looks at the top of https://docs.datomic.com/client-api/datomic.client.api.html then you can see them described. It took me sometime to work out how to pass them.