Counting How Many Product Images/Videos There Are On A Site

Hello all, I would like to have my program count the number of images/videos a product contains. For example, if I looked at the product below, I’d like the program to tell me there are 3 images and 1 video, since if you click on the right arrow you’ll see there is one more image. Does anyone have any ideas on what might work?

URL: Image Example