UNavigationSystemV1::GetPathLength

Potentially expensive. Use with caution