Improved comments
count the number of pending tasks