nested_type_count function

The number of fields