add exception throw to getRelationCountQuery docblock