[Editor's note: array at from dot pl had pointed out that count() is a cheap operation; however, there's still the function call overhead.]
If you want to run through large arrays don't use count() function in the loops , its a over head in performance, copy the count() value into a variable and use that value in loops for a better performance.
// Bad approach
// Good approach
$arr_length = count($some_arr);