s/XXX_shizzle/d_count_templates_scopes/, flip args, other tidying