Check Coordinate if its increasing by value over time

I try to make a score that is related to the distance my Character is moving. Its made in 2D.
My Character ist moving at a constant speed and i want do add 1 to score the every time my Character moves 1 one the x coordinate forward(to the right).
So far i only got a little bit of code where the score gets +1 on every FixedUpdate and that works but its not what i try do to. I thought on something with comparing transform.position but im not sure how to do that.

    public Text scoreText;
    public Vector3 position;

    void Start()
    {
        score = 0;
    }

    void FixedUpdate()
        {
            if (isRunning)
            {
                Debug.Log("X-Coordinate = " + transform.position.x.ToString());
                scoreText.text = score++.ToString();
            }
        }

This is how I would do it :

public Text scoreText;
public Vector3 position;
private int xPosition ;

void Start()
{
    score = 0;
    xPosition = Mathf.FloorToInt( transform.position.x ) ;
}
void FixedUpdate()
{
    if (isRunning)
    {
        int x = Mathf.FloorToInt( transform.position.x ) ;
        if( x > xPosition )
        {
            xPosition = x ;
            scoreText.text = score++.ToString();            
        }
        Debug.Log("X-Coordinate = " + transform.position.x.ToString());
    }
}