---
id: reflect-field_count
name: Reflect.field_count
category: reflect
kind: namespace-method
tokens: Reflect.field_count
sig: Reflect.field_count(prop) -> int
tip: How many fields a property has.
order: 5
ns: Reflect
member: field_count
---
Returns the number of fields in property prop. Walk 0 .. Reflect.field_count(prop) with Reflect.field_name and Reflect.field_type to enumerate a component's shape.
Parameters:
- `prop` — a property id (from Reflect.prop)
```ludic
program Demo {
property Health { hp: int = 0, max: int = 0 }
model Unit { Health }
entry {
print(Reflect.field_count(Reflect.prop("Health"))) # 2
}
}
```