remove parameters of printCounter and use local variables instead in $.countText