When using WordPress, usually in homepage, you’ll set the post count to 5-10 but if you have more than 100 posts and when users search your site, it may return search result that paging between 1-3 pages. In my experience, user tend not to browse to page 2 for the search result and this will cause some lost page views in your end. Here’s a snippet you can add to your functions.php that can help you set different post count in search, tag or archive page.

if( !function_exists('post_count_on_archive') ):
function post_count_on_archive( $query ) {
if ( $query->is_tag() || $query->is_search() || $query->is_archive() ) {
$query->set( 'posts_per_page', '50' ); /*set this your preferred count*/
}
}
add_action( 'pre_get_posts', 'post_count_on_archive' );
endif;

Now your tag, search and archive page will return 50 posts per page.

Related Articles:

Snippets
How to Get Facebook Page Like Count Without Access Token
WordPress Tutorials
WordPress Developer should learn about apply_filters() and why?
Snippets
Using Searchform to Search Keyword on WordPress Title only
Snippets
Disable Certain Area or Element in Localhost Testing Enviroment