Count the number of custom posts per user

Use the second parameter $post_type:

count_user_posts( $current_user->ID, 'my_post_type' );

More information on count_user_posts()

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