---
title: "[Xporter] How to count or sum values"
canonical: "https://docs.getxray.app/space/ProductKB/46268543/%5BXporter%5D%20How%20to%20count%20or%20sum%20values"
format: markdown
---
Counting or summing values can easily be done by following the example below.

> ℹ️ `${set(count,0)}
> ℹ️ #{for links}
> ℹ️ #{if (%{'${Links[n].LinkType}'.equals('tests')})}
> ℹ️ ${set(count,%{${count} + 1})}
> ℹ️ #{end}
> ℹ️ #{end}`

## Related articles



> Macro (contentbylabel)

> Macro (details)
> 
> | **Related issues** | > Macro (jira) |
> | --- | --- |