/* call-seq: SQLite3::Backup#pagecount
 *
 * Returns the total number of pages in the source database file.
 *
 * Note that the value is only updated after step() is called,
 * so before calling step() returned value is invalid.
 */
static VALUE pagecount(VALUE self)
{
  sqlite3BackupRubyPtr ctx;

  Data_Get_Struct(self, sqlite3BackupRuby, ctx);
  REQUIRE_OPEN_BACKUP(ctx);
  return INT2NUM(sqlite3_backup_pagecount(ctx->p));
}