adding a numbers to a item from navigation menu

You can target the location like this:

function wpa_filter_nav_menu_objects( $items, $args ){
    if( $args->theme_location === 'primary' ){
        foreach( $items as $item ){
            if( strtolower( $item->title ) === 'sample page' ){
                $item->title = $item->title . '(10)';
            }
        }
    }
    return $items;
}
add_filter( 'wp_nav_menu_objects', 'wpa_filter_nav_menu_objects', 10, 2 );

You can also try $args->menu_id if you use that input parameter.