Allow customers add only 3 items to website

I want to allow my customers to add just 3 items to the website, I think I have to use getTotalCount, but I need help, some help would be appreciated
thank you

$w.onReady( () => {
$w(" #myDataset “).onReady( () => {
let count = $w(”#myDataset").getTotalCount();
} );
} );