```const usersWithCount = await prisma.user.findMa...
# orm-help
a
Copy code
const usersWithCount = await prisma.user.findMany({
  select: {
    _count: {
      select: { posts: true },
    },
  },
})
this code example from the docs gets the post count for each user how would get, lets say, the count of published posts?
n
Hey Avi 👋 Filtered count in relations is not supported yet, we have a Feature Request for this: #8413 If you could leave a 👍 to the request, it would help us in prioritising. For now, you would need to resort to Raw Query.