item count after query not working

I am attempting to count items after a query and change a text value to show the count. However, the text does not change. Could someone point me to the error in my code below?

export function searchbutton_click(event) {
wixData.query(“dataset1”)
.contains(“keywords”, “test”)
.count()
.then( (num) => {
let numberOfItems = num;
$w(‘#text1’).text = numberOfItems.toString();
} )
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
} );
}

The code itself looks like it should work, but I’m noticing something that could be the problem. When using wixData.query, you use the actual collection name and not the dataset tied to that collection.

Great catch. That worked, many thanks!