$r = CIBlockElement::GetList([],
[
[
"LOGIC" => "OR",
["PROPERTY_LINK1" => $arIds],
["PROPERTY_LINK2" => $arIds],
["WF_PARENT_ELEMENT_ID" => $arIds]
],
"SHOW_HISTORY" => "Y"
],
false, false, ["ID"]);
echo $r->SelectedRowsCount();