Count value from deferent datasets by dynamic page name

Hii

how can i make my code Count value from deferent datasets by dynamic page
title name page as value the idea that if you move to deferent dynamic page
you will see deferent count

I came this far:

import wixData from ‘wix-data’ ;

$w . onReady ( function () {
setInterval ( $w ( ‘#dataset5’ ). refresh , 500 )

wixData . query ( "Assets" ) 
    . eq ( "status" ,  "available" ) 
    . count () 
    . then (( num ) => { 
        $w ( "#vacant" ). text  =  num . toString () 
    });