Include count of relations

How can I achieve the same this Prisma query does in Drizzle?
const result = await prisma.user.findUnique({
  where: { id },
  include: {
    posts: {
      select: {
        _count: true
      }
    }
  }
});

I'd like to include the number of posts the user has created in the result
Was this page helpful?