countFirstOrder function

Count first-order relatives.