Counting chain links.