update links, change count to patterns