I'm not certain this is it, but I would give it a try. You have the third parameter of get_post_meta set to true, which according to the function reference, tells it to return a string.
Then you use the PHP count function to test for a result, but the count function is designed to be passed either an object or a string, so it may be causing a problem.
There are a couple of ways to fix this, but since what you really want is a string, I would try the following:
$thumb_id = get_post_thumbnail_id($post->id);
$alt = get_post_meta($thumb_id, '_wp_attachment_image_alt', true);
If there is no "alt" attribute for the given ID, you're going to get an empty string so you'll be echoing an empty string or the value you want.