Find Number Of Same Elements In An TArray

Thanks. After looking at some other posts and comparing with yours I came up with below which works just fine.
Thank you very much

	for (int i = 0; i < Inventory.Num() - 1; i++)
	{

		FInventoryItem CheckedSlot = Inventory[i];
		if (CheckedSlot == *EmptyInventorySlot)
		{
			AmountOfEmptySlots++;
		}
	}