The GetNumTasks function retrieves the number of currently running tasks.
This function has no parameters.
The return value specifies the number of current tasks if the function is successful. Otherwise, it is zero.