You can use ulTaskNotificationValueClear() to query a task’s notification value (count in this case) without actually clearing the value just by setting the “bits to clear” parameter to 0.
You can use ulTaskNotificationValueClear() to query a task’s notification value (count in this case) without actually clearing the value just by setting the “bits to clear” parameter to 0.