terr and card count ajax