$count
is an array of row objects, in this case only one:
echo $count[0]->count;
It might make more sense if you use $row
instead of $count
.
echo $row[0]->count;
So you are accessing the count column (object property) of the first row (row 0).