You have to put a grep -v grep here to be sure.
Also would recommend a wc -l here to do numeric comparison rather than string one.