Get the amount of posts on a current page

You can use the below to output the post amounts

<?php
$args = array(
  'post_type' => 'post', 
  'showposts' => '10'
);
 $wp_query = new WP_Query($args);
 // amount of posts per on the page
 $post_number = $wp_query->post_count;
 // amount of posts across the post pages
 $post_number2 = $wp_query->found_posts;
 echo $post_number.'<br />';
 echo $post_number2.'<br />';
 while ( have_posts() ) : the_post();
 php get_template_part( 'post', get_post_format() );
 php endwhile; 
?>