You can’t assign a number to a text element, and your function needs a closing bracket. Your function should look like this:
export function count_viewportEnter(event) {
$w("#count").text = $w("#dataset1").getTotalCount() + ''; // make into a string
}