Some changes to counter script.