Get the count of a nested relation in findMany()

Is it currently possible to get the count of a nested relation in findMany() query?
const data = await db.query.docs.findMany({
  with: {
    articles: {
      with: { attachments: { count: "Count of attachments here" } }
    } 
  }
});
Was this page helpful?