tff.types.count

Returns the number of types in type_signature matching predicate.

type_signature A tree of computation_type.Types to count.
predicate A Python function that takes a type as a parameter and returns a boolean value.