# tff.types.count

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |

Returns the number of types in `type_signature` matching `predicate`.

    tff.types.count(
        type_signature: https://www.tensorflow.org/federated/api_docs/python/tff/types/Type,
        predicate: https://www.tensorflow.org/federated/api_docs/python/tff/types/Type
    ) -> int

<br />

<br />

<br />

| ## Args ||
|---|---|
| `type_signature` | A tree of `computation_type.Type`s to count. |
| `predicate` | A Python function that takes a type as a parameter and returns a boolean value. |

<br />