'the value does not change while running the code

I have written this to Count the number of the spaces in the text area in html and it was working very good but after I imported this in intellj and turn it from .htm to .ftl ( it is required from the prof in ftl (Freimarker template) ) it tells me there is a problem and the remaining is unfined. a foto is attached . thanks enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source