How to Add Custom New Published Post Counter Icon on Top of the WordPress Site

I have a technology blog based on wordpress. I would like it to show a icon on top of the menu bar to show new post counter for today. Just like Android Authority website (check here http://prnt.sc/ck4q62)
Am a newbie here and i dont know a lot about CSS and Function.php the only thing i know is basic wordpress editing skills.
I’ve tried google about it, but without any luck at all.

Any ideas on how to do it or the function.php file i can add in my theme child theme am using bunchy wordpress theme)

Thanks in Advance You For Your Help

Solutions Collecting From Web of "How to Add Custom New Published Post Counter Icon on Top of the WordPress Site"

Check out code below.
Function returns a number of posts published with todays date. You just have to modify a navigation a little bit to add this number counter to a menu bar.

echo "<h1>Today is: " . date("Y-m-d") . "</h1>";

function published_today() {
  $counter = 0;
  $posts = get_posts(array('numberposts'=>-1));
  foreach ($posts as $post){
    if (get_the_time('Y-m-d', $post->ID) === date("Y-m-d")) {
      $counter++;
    }
  }
  return "Posts published today: " . $counter;
}

echo published_today();

Have a look here Count posts or custom post types from last 24 hours (or from today)

The main goal would be to count all the published posts then loop through and get the ones that match the todays date.

Jason