On the number of discrete chains