Added total count of instances to template