$count = $session->countf( $object, $relationship, $freshness )
The countf() function counts the number of elements in the specified relationship, such as countElements(). The contents of the relationship will be refreshed if the values are older than $freshness seconds. The section “$freshness” on page 73 provides additional information.