FTaskGraphInterface::GetNumForegroundThreads

Return the number of foreground worker threads.