import { PrismaClient , User } from '@prisma/client' ; async function main ( ) { const prisma = new PrismaClient ( ) ; const users = await prisma . user . findMany ( { include : { _count : true , } , } ) ; const postsCount = users [ 0 ] . _count . posts ; const likeCount = users [ 0 ] . _count . Like ; } main ( ) . catch ( ( e ) => { console . error ( e ) ; } ) ;