You're correct about it not working.
First off, and if you had tested your code you would've seen this error, you need an if before an else
Here's a suggestion
Code:
on *:text:*:#:{
  if (*sampletext* iswm $strip($1-)) {
    watch $nick $chan $1-
  }
}
alias watch {
  inc $+(%,watch,.,$1,.,$2)
  if $($+(%,watch,.,$1,.,$2),2) > 5 {
    unset $+(%,watch,.,$1,.,$2)
  }
  if (*sampletext2* iswm $3) && $($+(%,watch,.,$1,.,$2),2) {
    ;code to be executed if text is detected while being watched
  }
}

This will keep track of the lines entered on a nick by nick basis as well as a channel by channel basis. This type of tracking is handy for things like detecting who swears in what channels how many times.