LPS-37266 Calculate the total properly

I called the variable 'count' because it was the closest to what was used in other similar JSP's