For your second question, you should append the aggregate function count() to the end of the query builder, rather than the end of your $result variable since it's impossible to call a method on an array type.
And when you use PDO::FETCH_OBJ it's just a plain stdClass with props without any knowledge about a count() function.
Well the thing is that the query I run its select count(*) from table where... So it returns just a one record and one column with the total number of records. I want to know the count of records just to make sure I received back a record. I understand that count will not work with the object but what if I make the change you suggested, will it work as count($result) properly?