Getting count of 'related items' in TAL

I have a folder view showing Title, creator, etc for all content (in the folder).

Is it possible to show the count of items that have relations to each item IN TAL?

Or is is the only option to 'do all the looping in template.py' and get relations with api.relation.get or similar ?


If it matters, I only need the count of relations (to), not antying else.

What is the point with not retrieving the related items and counting them?

Item is 'task', customer wants to know how many 'subtasks' each task has (in the folder listing).

You know the answer.