i am using a JavaScript and it have the below code:
You will need to store the count variable on a server-side control in order to do this.
Example:
Then, in your code-behind simply use:
int value; if (Int32.TryParse(example.Value, out value)) { // Do something with your value here }