counting text for links