Override the onPrepareOptionsMenu method to include the code which sets the title of the actionBar menu item.
onPrepareOptionsMenu : Prepare the Screen's standard options menu to be displayed. This is called right before the menu is shown, every time it is shown. You can use this method to efficiently enable/disable items or otherwise dynamically modify the contents.
@Override
public boolean onPrepareOptionsMenu(final Menu menu) {
MenuItem menuItem = menu.findItem(R.id.itemID);
menuItem.setTitle(Integer.toString(scoreVal));
return true;
}
Now, whenever you want to update the score text, update the instance variable scoreVal and call invalidateOptionsMenu() from the UI Thread. Calling this method will redraw the Menu hence calling onPrepareOptionsMenu() as defined above.