/Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h
Returns the total number of available player controllers, including remote players when called on a server. Indexes up to this can be used as PlayerIndex parameters for the following functions.
static int32 GetNumPlayerControllers ( const [UObject](API\Runtime\CoreUObject\UObject\UObject) * WorldContextObject )