How include comment and post count of user in this custom query

There’s the count_user_posts function which will give you a count of posts for a given user id. From a quick look through the Codex, I don’t see a similar function to return a comment count. But after looking at the source for count_user_posts, I think it would be easy to adapt the code to count comments instead.

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