In your screen shot of the code error, you will see that there is a space between getTotalCount and ().
You have:
$w("#count").text = $w("#dataset1").getTotalCount ();
Get rid of the space, and you should have:
$w("#count").text = $w("#dataset1").getTotalCount();
