For that you need to have a shift register or a feedback node and keep counting whenever the case structure case is executed the count will be increased by one see the attached snippet.
What happens if I want to have a button to reset the output of the feedback node to zero?
Can I reset the value of the "wire"?
Use a select statement to feed a zero into the feedback node instead of the value coming from the +1.
Yes you can do by this way.
Instead You can use the case structure also as said.