Why is the int not changing

Why is my int to changing when the first speed1 is going flase and the speed 2 true why does the int not changing

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpeedINT : MonoBehaviour
{

    public int anzahl;

    public GameObject speed1;
    public GameObject speed2;
    public GameObject speed3;
    public GameObject speedclose;



    public void Update()
    {


        if(speed1 == true)
        {

            anzahl = 1;

        }
        else if(speed2 == true)
        {

            anzahl = 2;

        }
        else if (speed3 == true)
        {

            anzahl = 3;

        }
        else if (speedclose == true)
        {

            anzahl = 4;

        }



    }






}

I don’t believe a GameObject can equal true.

change gameobject to bool