How many lines in a file with count always returns 1
<p>I'm extremely new to php and I am trying to get how many lines there are in my file.  I am currently using some code I found online.</p>

<pre><code>$file = "filename";
$lines = count(file($file));
</code></pre>

<p>This returns <code>1</code>. and there are MANY more lines than that.  Any insight? Does it have something to do with new line characters? I did a <code>$fh = file($file); split('\n', $fh);</code> and the count of that is still 1....so I am not sure.  </p>
