for your radio buttons, set their
onclick
property to
countUp(). Then use a javascript function to update a counter and show its value in an element. like this :
<input type="radio" name="a" value="a" checked="" önclick="CountUp()">a</input>
<input type="radio" name="b" value="b" önclick="CountUp()">b</input>
<div id="result">0</div>
<script type="text/javascript">
var counter = 0;
function countUp() {
counter++;
document.getElementById("result").innerHTML = counter;
}
</script>