Added check count and fixed difference to only give a number if has a last var
Made javascript update numbers