How do I find the count of the current post?

There isn’t an order or numbering of posts like this that is stored in WordPress.

The database stores things with a ‘primary key’, which is just a number, but this always stays the same for each post, forever. So if you add lots of posts and remove lots of posts then add some more, the Primary Key for the first 3 posts might be 1,20,100.

If you want to find the ‘count’ or the ‘order’ of posts like in your question then you have to choose how you want to sort them and then find the order yourself.

For example, you could use WP_Query to get all your posts ordered by date, and then print them in order giving them numbers 1,2,3,4, and you could also use this list to determine what number in this list any post was.

HTH. Please expand your question if you need more information.

EDIT:

So according to your updated question you need to do something like this. You could store this number in a post_meta field and hook into the save post hook to update this if you wanted to – that would be more efficient than running this on every page load.

$args = Array(
    'orderby' => 'date',
    'order' => 'ASC' // oldest first
}

$postsSorted = get_posts($args);

$count = 1;
$postToNumbers = Array();


foreach($postsSorted as $post) {
    $postNumbers[$post->ID] = $count;
    $count++;
}

This would give you an array that lets you look up the ‘count’ for any post ID. So you use this like:

$postID = get_the_ID();  // whatever method is relevant to where you are to get the post ID 
echo "The count of this post is " . $postNumbers[$postID] ;

You could put this in a function to make it easy to call, or as above you could hook it into the save / delete posts hooks to store the number in post meta and make the number get updated whenever posts are added removed, but you’ll need to write the code for that 😉

Does that help?