DDF-165: Freemarker tempalte was not checking for an empty count after a clear/reset causing an exception in the logs