how to make a death counter and fix text to a point on the screen 2d

i am making a 2d platformer and i have this code

using System;
using UnityEngine;
using UnityEngine.SceneManagement;

namespace UnityStandardAssets._2D
{
    public class Restarter : MonoBehaviour
    {
        private void OnTriggerEnter2D(Collider2D other)
        {
            if (other.tag == "Player")
            {
                SceneManager.LoadScene(SceneManager.GetSceneAt(0).name);
            }
        }
    }
}

and wanted to add a death counter how would i do this and also how would i fix the text that made the death counter in a position

Track death++ on an Object with DontDestroyOnLoad. Use the Unity UI and position a Text label to display it.