Code:
on *:text:!Checkquote *:#:{
  var %string = $2-
  var %quantity = $count(%string,$chr(34))
  if (%quantity == 0) { msg $chan Error: $chr(34) Not found in text | return }
  if (2 \\ %quantity) { msg $chan odd } 
  if (2 // %quantity) { msg $chan even }
}


try that, adjust it to do what you want