Hi Aileen,
The following community tutorial has some information on the calculation you might need:
http://community.landesk.com/support/docs/DOC-26389
Under the heading 'getting the number of items in a collection' it shows an example on how to return a count from a collection.
The example shows how to return the number notes however the same could be applied to task collection.
You may also need to add the tasks collection to the dependencies.
To find just the open tasks you may need to follow the tutorial to the next examples which covers how to loop through the collection to find specific collection items.
Calvin