Add a function to get the number of tile patterns of a tileset.