Added cookie detection and counting on the index view.