I have multi author wordpress site and every author can publish posts from two different post types . i want to display author post count by post type in author.php . According to codex.wordpress i used this code: but it displays total post count instead of author post count.
<?php echo 'Number of posts published by user: ' . count_user_posts( $userid , "book" ); ?>