counting sum on front