The word problem distinguishes counter languages