Track the number of queries each template executes - experimental!