I used the first because it seemed he was counting query windows which may need to include the triggering query(?), otherwise I would've suggested using the ^ prefix. So assuming that he had his reasons, I just fixed the error in his code (the -m switch) rather than trying to improve it.