Fix update_contact_uncompleted_tasks_count

Also add task spec