Been there done that using the following:
echo $result->CustomObject2QueryPage->LastPage;
echo $result->LastPage;
both return nothing. Here is the print_r statement that populates $result:
$result = print_r($ws->CustomObject2QueryPage(array(
'UseChildAnd' => 'true',
'PageSize' => 100,
'ListOfCustomObject2' => array(
'CustomObject2' => array(
'OwnerExternalSystemId' => '',
'MedEdEventExternalSystemId' => '',
'CustomObject3IntegrationId' => '',
'CustomObject2Id' => $RowId,
'Name' => '',
'AccountName' => '',
'AccountExternalSystemId' => '',
'ActivityExternalSystemId' => '',
'ActivityIntegrationId' => '',
'AccountId' => ''
), 'Echo' => '',)
), true);