Change example to count number of remaining tasks