Count to how many categories a post belongs to

Use get_the_terms() and count the resulting array:

print count( get_the_terms( $post->ID, 'category' ) ) . ' categories';

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)