Adding counter and classes to library page.