Hi Rizvan.
You can use an Aggregate Model to do this and display the aggregate field in the display template.
When you add a model click on Advanced and change the model type from Basic to Aggregate.
There is a section in the tutorials on Aggregate Models too.
Enjoy.