get no of qustion in quiz module

There is a problem in quiz module in drupal. that it dose not show any way to see the no of quiz contains. This script can be used to show the no of question in quiz (drupal module) using views or anywhere else you can use.

<?php
$ttlQs = db_query("SELECT COUNT(*) as ttlCnt FROM {quiz_node_relationship} where parent_nid = %d", $data->nid);
$ttlQs = db_fetch_array($ttlQs);
print $ttlQs['ttlCnt'];
?>


Thanks
Up Stairs