/** * Counts all associated MarriagesAsMarriedTo * @return int */ public function CountMarriagesAsMarriedTo() { if (is_null($this->intId)) { return 0; } return Marriage::CountByMarriedToPersonId($this->intId); }