The value would be the name of the affiliate or affiliate ID as it is stored in the table. The key column would be the affiliate name or affiliate ID column depending on what you're passing into the URL parameter.
Before you can use the URL parameter in the server behavior, you will have to add it to the page bindings. You can do this by going to the Bindings panel and hitting the "+" button and selecting URL Variable. In the popup, enter the name of the url variable you are using and hit ok.
You will also have to get the current count for that affiliate. You can do this by adding a recordset and looping through until you get the correct value. Then store this in a variable and use this to update the value of the field.