+ if options.missing:
+ # switch the series, the one specified with --missing should
+ # become the current
+ cmp_series = crt_series
+ crt_series = stack.Series(options.missing)
+ stgit.commands.common.crt_series = crt_series
+
+ cmp_patches = cmp_series.get_applied() + cmp_series.get_unapplied()
+ else:
+ cmp_patches = []
+
+ applied = [p for p in crt_series.get_applied() if p not in cmp_patches]
+ unapplied = [p for p in crt_series.get_unapplied() if p not in cmp_patches]
+
+ if options.count:
+ print len(applied) + len(unapplied)
+ return