By default, excerpt length is set to 55 words. To change excerpt length using excerpt_length filter, add the following code to functions.php file in your theme:

function your_excerpt_length($length) {
	return 30;
}
add_filter('excerpt_length', 'your_excerpt_length');

Resource

WordPress Codex : the_excerpt()