Use $userip in count_clicks()
Fix counter()