more debugging output: num templates used