Aggregates inside datalog filters

Can this post-query filter be done entirely in a peer-server?

(->> $
     (d/q '[:find (count ?fe) ?e :where
            [?e :request/type]
            [?e :link-query/find-element ?fe]])
     (filter #(< 1 (first %)))
     (map second))

Using the Client API (i.e. with peer-server) you would need to get the result of the query from the client API call then do the filter and map in your application code.