Unfortunately the quick-and-dirty hack didn't work out as easily as I'd hoped - the iterator.spine thingy that looked really promising at first glance turns out to only index the HTML files inside an epub. Work's been crazy busy so I didn't dig deeper, probably won't for a few days yet. At which point I'll take this over to the Count Pages plugin thread, since that still seems like the most appropriate plugin to be fiddling with.