How does one add numbers to an admin menu?

Found this and it helped: https://rudrastyh.com/wordpress/notification-counter-bubbles.html

$notification_count = 2; // here we get the count somehow in the code
add_menu_page(
    'Tickets',
    $notification_count ? sprintf( 'Tickets <span class="awaiting-mod">%d</span>', $notification_count ) : 'Tickets',
    'manage_options',
    'tickets_page_slug',
    'tickets_page_handler'
);