Index: trunk/psphot/src/psphotMagnitudes.c
===================================================================
--- trunk/psphot/src/psphotMagnitudes.c	(revision 29004)
+++ trunk/psphot/src/psphotMagnitudes.c	(revision 29936)
@@ -9,6 +9,5 @@
     psAssert (recipe, "missing recipe?");
 
-    int num = psMetadataLookupS32 (&status, config->arguments, "PSPHOT.INPUT.NUM");
-    psAssert (status, "programming error: must define PSPHOT.INPUT.NUM");
+    int num = psphotFileruleCount(config, filerule);
 
     // skip the chisq image (optionally?)
