Try the following:
var q = $('div[id^="Q"]').length // number of questions
$('input[type=radio]').change(function(){
$(this).parent().css('background-color', 'Gray');
var remained = q - $('input[type=radio]:checked').length // number of unanswered questions
$('#remaining').text(remained)
})