Im trying to count all sprites with a cetain layer wich also have a specific position.

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

public class Click : MonoBehaviour
{

void Update()
{

    var amountOfCircle = GameObject.FindGameObjectsWithTag("buttonCircle" && transform.position == new Vector3(transform.position.x, transform.position.y, -1));

//I know that u cant put bools here but I’m trying to show what I want with this.;

int numberOfCircles = 0;

    foreach (GameObject circle in GameObject.FindGameObjectsWithTag("buttonCircle"))
    {
        if (circle.transform.position == new Vector3(posX, posY) && circle.layer == yourLayerNumber)
        {
            numberOfCircles++;
        }
    }