You can also use imageenio.IEGetFileFramesCount
function IEGetFileFramesCount(const FileName:WideString):integer;
Description
This is a generic way to get number of frames in a multipage file (GIF, TIFF, AVI, MPEG...) or a single page (JPEG...).
William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html