Simple script to do two things:
1. select a record table where a value matches a field value
2. if "count" value from above selected record is less than "4" leave a set varA the same, and increment "count" by "1".
3. else replace varA with another value and reset "count" to "0"