Count pipeline takes too much time

I have total 500k data in that collection. when I run the aggregation without count it takes 800ms. but when do it with count pipeline it takes 7sec. total count after the filter is 30k. how to reduce the time? please help. pipeline given below

[
  {
    $match: {
      "destinations.ref": {
        $in: [
          "27407",
          "27408",
          "28022",
          "33430",
          "27405",
          "29095",
          "27406",
          "27666",
          "50665",
          "50667",
          "24161",
          "33315",
          "28583",
          "31073",
          "23411",
          "28882",
          "28838",
          "29398",
          "29399",
          "33431",
          "28839",
          "26226",
          "33165",
          "36683",
          "28881",
          "22632",
          "26112",
          "27338",
          "28880",
          "52175",
          "50951",
          "50666",
          "50507",
          "4736",
          "205",
          "30631",
          "51018",
          "51019",
          "26110",
          "26225",
          "22435",
          "27852",
          "51043",
          "50989",
          "22664",
          "4815",
          "4814",
          "4237",
          "23401",
          "24336",
          "29857",
          "4239",
          "946",
          "51136",
          "33601",
          "33602",
          "947",
          "5538",
          "28840",
          "22769",
          "4226",
          "4227",
          "28682",
          "50670",
          "50845",
          "4223",
          "775",
          "25960",
          "27173",
          "29856",
          "4232",
          "802",
          "805",
          "22149",
          "51020",
          "51036",
          "51037",
          "50664",
          "25822",
          "27188",
          "25873",
          "28616",
          "27538",
          "26732",
          "50668",
          "512",
          "50591",
          "50509",
          "26113",
          "25817",
          "33081",
          "27234",
          "27187",
          "30027",
          "4236",
          "25818",
          "791",
          "22033",
          "22810",
          "22034",
          "27667",
          "24293",
          "51289",
          "4222",
          "4231",
          "4229",
          "51035",
          "50508",
          "508",
          "511",
          "51206",
          "23520",
          "28582",
          "25557",
          "23521",
          "29720",
          "945",
          "522",
          "51045",
          "206",
          "28585",
          "33623",
          "27742",
          "50958",
          "26227",
          "22436",
          "22138",
          "26111",
          "520",
          "22631",
          "29096",
          "50672",
          "944",
          "51038",
          "51044",
          "519",
          "57",
        ],
      },
      status: "ACTIVE",
    },
  },
  {
    $lookup: {
      from: "availability_schedules",
      localField: "productCode",
      foreignField: "productCode",
      as: "schedules",
      pipeline: [
        {
          $project: {
            _id: 0,
            summary: 1,
            currency: 1,
          },
        },
      ],
    },
  },
  {
    $lookup: {
      from: "exchange_rates",
      let: {
        scheduleCurrency: "$schedules.currency",
      },
      pipeline: [
        {
          $match: {
            $expr: {
              $in: [
                "$sourceCurrency",
                "$$scheduleCurrency",
              ],
            },
          },
        },
      ],
      as: "exchangeRates",
    },
  },
  {
    $addFields: {
      exchangeRate: {
        $arrayElemAt: ["$exchangeRates.rate", 0],
      },
    },
  },
  {
    $addFields: {
      usdPrice: {
        $multiply: [
          "$exchangeRate",
          {
            $first:
              "$schedules.summary.fromPrice",
          },
        ],
      },
    },
  },
  {
    $lookup: {
      from: "exchange_rates",
      pipeline: [
        {
          $match: {
            $expr: {
              $in: ["$targetCurrency", ["ILS"]],
            },
          },
        },
      ],
      as: "ilsRates",
    },
  },
  {
    $addFields: {
      ilsRate: {
        $arrayElemAt: ["$ilsRates.rate", 0],
      },
    },
  },
  {
    $addFields: {
      convertedPrice: {
        $multiply: ["$ilsRate", "$usdPrice"],
      },
    },
  },
  {
    $project: {
      title: 1,
      productCode: 1,
      "images.variants.url": 1,
      "description.he": 1,
      "reviews.combinedAverageRating": 1,
      "itinerary.duration": 1,
      "schedules.summary": 1,
      "schedules.currency": 1,
      convertedPrice: 1,
    },
  },
  {
    $facet: {
      metadata: [
        {
          $group: {
            _id: null,
            total: {
              $sum: 1,
            },
          },
        },
      ],
      data: [
        {
          $skip: 0,
        },
        {
          $limit: 15,
        },
      ],
    },
  },
  {
    $project: {
      data: 1,
      total: {
        $arrayElemAt: ["$metadata.total", 0],
      },
    },
  },
]

In your other thread about some similar if not identical, @Aasawari, asked you a few things that are really important if you want us to help you.

Having a $in with so many string values makes me feel like there is something wrong with the schema.