count -> perm_count: less confusing global.