how to show Author post type count

Are you sure? Look at the code of this function (at the bottom of the page). It just retrieves the posts count for the user from the database. I think you misinterpreted your code.

Yes, it relies on get_posts_by_author_sql() function. But look at its code too… 6125 line. It justs adds posts types to the SQL query.

So you either misinterpreted your code (most likely), or your database structure is broken.