I prepared a code, it works when there is a new post, but how do I show users that it is +1 each time a post is made, and if the user clicks on the list of posts, it will be deleted, then it will start counting again: D
add_action("auto-draft_to_publish", "doSomething", 10,1);
function doSomething($post){
global $post;
$_SESSION['new_post'] = 'new post 1';
}