IF you require result to be an array, shouldn't you use is_array() rather than count? I would expect count to behave as strlen() on an character array otherwise called a string; is_array() does not consider a string to be an array, however.
, it says "[Count r]eturns the number of elements in var, which is typically an array, since anything else will have one element." The examples include count(false) returns 1. This seems to match the issues pointed out in the bug pretty well.