You can see that in below specified article. The article shows creating a vowel count sample application with progress as well as updating the count. The logic for updating the count will help answer your question:

The Link is Here