get total files from template before processTemplate