I'm struggling to find a reference for the gallery functions. I want to output in my sidebar the total number of photos I have. Currently I'm trying to use g->fetchItemIdCount('GalleryAlbumItem') but it always appears as 0. I just want the total number of photos in my gallery, and I can get from $theme the number of items in a given child with no issue.