Setting counter and sum to zero.