Hi there,
I would perhaps run a loop in which I compare the specified value (search string) to each exploded-array's value. If matched, then unset it from the array, and in the end, you'll get an array with the specified values deleted.
OR
You can perhaps use array_search() function to do the same trick:
PHP Manual: array_search()
http://ca.php.net/manual/en/function.array-search.php
In reply to your second question, you can do something like this:
file() takes each line of a specified file as an array value, and count this value and assign this number to the var $lc, then you'll get a line count.
HTH.