your code was quite a ways off.
you where looping through the recordset to get the returned count and writing the number of records.
I changed the code to this to get it working:
<select name="CDID">
<option value="" selected="selected">- - - Select a Class - - -</option>
<?php
do {
?>
<option value="<?php echo $row_ClassDetails['CDID']; ?>" >
<?php
// make date normal mm/dd/yyyy
$mysqldate = $row_ClassDetails['CDDate'];
$mydate = date("M, d Y",strtotime($mysqldate));
echo $mydate;
?> -
<?php echo $row_ClassDetails['CDName']; ?> - <?php
$cdid = $row_ClassDetails['CDID'];
$rtnUID = $row_rtnUser['rtnUID'];
//$sql = "SELECT COUNT(rtnUID) AS total FROM rtnUser GROUP BY CDID";
//$query = mysql_query($sql);
//$count=0;
//while ($recordset = mysql_fetch_assoc($query))
//{
// $count++;
//}
//echo "$count";
mysql_select_db($database_rtn, $rtn);
$sql = "SELECT DISTINCT COUNT(CDID) AS total FROM rtnUser WHERE CDID = $cdid";
$query = mysql_query($sql, $rtn) or die(mysql_error());
$row_query = mysql_fetch_assoc($query);
?>
<?php echo $row_query['total']; ?> of <?php echo $row_ClassDetails['CDMaximum']; ?> max.
</option>
<?php
} while ($row_ClassDetails = mysql_fetch_assoc($ClassDetails));
?>
</select>

