Find total number of frames.