Add a function to get the number of frames of a tile pattern.