JS backend: increment counter for fresh names