Counting custom post type with wp_count_posts returns an empty object

Counting custom post type with wp_count_posts returns an empty object

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