Printing a number in the top right corner?

If I wanted to add to a value and print it to the top right corner how would I go about this?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Collectables : MonoBehaviour {
    // Use this for initialization
    void Start () {
      
    }
  
    // Update is called once per frame
    void Update () {
      
    }
    void OnTriggerEnter2D(Collider2D other)
    {
    
    if (other.tag == "Player")
        {
            Destroy(gameObject);
        }  
    }
}

If you don’t care about it being styled:

float myNum;

void OnSceneGUI () {
    GUILayout.Label (myNum);
}

If you want to be able to easily style/move the display, you should create UI Text object and reference it:

public UnityEngine.UI.Text TextComponent;

void Update () {
    TextComponent.text = myNum
}