If this is a fairly quick operation it might not be worth displaying the progress as it might have an impact on your performance.
With that said, I would connect all of the objects in your batch to a Summary object, you can then give the summary object two attributes: Current progress, Total. Assign Total as a sum from your values – you can perform a list aggregation. You can then simply change “Current progress” to add the processed value to it every time you update a line, and refresh in client when required.
Hope this helps