La seconda è decisamente migliore

Poi non fare mai una query come questa
sql="SELECT count(*) from commenti where id =" & Trim(Request.QueryString("comid"))

ma, SEMPRE, sostituisci gli apici con doppi apici
se non vuoi che qualche lamer faccia del tuo database quello che vuole

sql="SELECT count(*) from commenti where id =" & Replace(Trim(Request.QueryString("comid")),"'","'' ")