OK, you are in ASP... Dreamweaver doesn't add the count to asp unless it is used... so you would have to have code above the validation:
var Recordset1_total = WADACOMMENTS.RecordCount;
if (Recordset1_total == -1) {
// count the total records by iterating through the recordset
for (Recordset1_total=0; !Recordset1.EOF; Recordset1.MoveNext()) {
Recordset1_total++;
}
// reset the cursor to the beginning
if (Recordset1.CursorType > 0) {
if (!Recordset1.BOF) Recordset1.MoveFirst();
} else {
Recordset1.Requery();
}
}