The Tag Cloud widget is a useful widget which displays a cloud of your most used tags on the sidebar or other areas that support widgets on websites powered by WordPress. But when the number of tags used grows, the list output by Tag Cloud widget may simply become too long or too short to your liking.

The Default Tag Cloud Widget
The default Tag Cloud widget does not support limiting or increasing the tags count.

Unfortunately, Tag Cloud widget does not provide any way to customize or set the number of tags to show in the output. To control the number of tags displayed by Tag Cloud widget, insert the following code snippet in your active theme’s functions.php custom functions file.

 /*********************************************************
 * Limit the number of tags displayed by Tag Cloud widget *
 *********************************************************/
add_filter( 'widget_tag_cloud_args', 'tj_tag_cloud_limit' );
function tj_tag_cloud_limit($args){ 
	// Check if taxonomy option of the widget is set to tags
	if ( isset($args['taxonomy']) && $args['taxonomy'] == 'post_tag' ){
		$args['number'] = 25; // Number of tags to show
 	}
	return $args;
}

Replace the number of tags to display with your own desired count. Example above shows 25 tags. By default, WordPress limits the terms shown to 45 most used tags. You can increase (add) or decrease (reduce) the number of tags shown as you like.

On the other hand, if you use custom taxonomies and want to display those instead, replace the post_tag (the default WordPress taxonomy for tags) in the above code with the custom taxonomy term.