pdfDocument.Pages[1].Artifacts has a count = 0

Your example code returns an empty Artifact list. No watermark for the example file you provide which does have a Watermark.

namespace Aspose.Pdf.Examples.CSharp.AsposePDF.StampsWatermarks
{
public class CountingArtifacts
{
public static void Run()
{
// ExStart:CountingArtifacts
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_AsposePdf_StampsWatermarks();

        // Open document
        Document pdfDocument = new Document( dataDir +  "watermark.pdf");
        int count = 0;
        foreach (Artifact artifact in pdfDocument.Pages[1].Artifacts) 
        {
            // If artifact type is watermark, increate the counter
            if (artifact.Subtype == Artifact.ArtifactSubtype.Watermark) count++;
        }
        Console.WriteLine("Page contains " + count + " watermarks");
        // ExEnd:CountingArtifacts            
    }
}

}

@learyjm

Could you please share your sample PDF document with us. We will test the scenario in our environment and address it accordingly.

It is your example file:

https://github.com/aspose-pdf/Aspose.PDF-for-.NET/blob/master/Examples/Data/AsposePDF/Stamps-Watermarks/watermark.pdf

@learyjm

We apologize for the inconvenience which has been faced.

We are looking into this issue and will get back to you soon.

Any progress on this?

@learyjm

We have replaced the incorrect file with the correct one. You may please download [new file] and run same example in order to get expected results. We apologize for the inconvenience faced.