/** * Counts all associated StateProvinces * @return int */ public function CountStateProvinces() { if (is_null($this->intCountryId)) { return 0; } return StateProvince::CountByCountryId($this->intCountryId); }