How to return count number from a wordpress database

It is recommended to use the $wpdb->get_var() method when retrieving a count of rows. This method will return the count directly, rather than inside of an array or object like wpdb::get_results().

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