/** * Counts all associated ShippingAccounts * @return int */ public function CountShippingAccounts() { if (is_null($this->intCourierId)) { return 0; } return ShippingAccount::CountByCourierId($this->intCourierId); }