used to get link counts