--- type: "fhirpath-function" title: "FHIRPath Function: count" function: "count" category: "Existence" section: "5.1.10" source: "fhirpath/functions.json" --- # FHIRPath Function: count Returns the integer count of the number of items in the input collection. Returns 0 when the input collection is empty. ## Summary - **Category**: Existence - **Section**: `5.1.10` - **Return Type**: `Integer` - **Empty Input Result**: `0` - **Errors on Multiple Input**: `false` ## Description Returns the integer count of the number of items in the input collection. Returns 0 when the input collection is empty. ## Arguments - none ## Type Mapping - `Any-Integer` ## Example ```fhirpath Patient.name.count() // returns the number of name elements ```