Index: trunk/psphot/src/psphotOutput.c
===================================================================
--- trunk/psphot/src/psphotOutput.c	(revision 34782)
+++ trunk/psphot/src/psphotOutput.c	(revision 34787)
@@ -201,8 +201,12 @@
     int nCR  = 0;
     int nEXT = 0;
+    int nForced = 0;
 
     // count the number of sources which will be written and other sub-types
     for (int i = 0; (sources != NULL) && (i < sources->n); i++) {
         pmSource *source = (pmSource *) sources->data[i];
+        if (source->mode2 & PM_SOURCE_MODE2_MATCHED) {
+            nForced ++;
+        }
         pmModel *model = pmSourceGetModel (NULL, source);
         if (model == NULL)
@@ -217,4 +221,6 @@
     }
 
+    // XXX: This loop cauess nSrc to be twice as large as it should be. This is kept
+    // for compatability
     for (int i = 0; (sources != NULL) && (i < sources->n); i++) {
         pmSource *source = (pmSource *) sources->data[i];
@@ -228,4 +234,5 @@
     psMetadataAddS32 (header, PS_LIST_TAIL, "NDET_EXT", PS_META_REPLACE, "Number of extended sources", nEXT);
     psMetadataAddS32 (header, PS_LIST_TAIL, "NDET_CR",  PS_META_REPLACE, "Number of cosmic rays", nCR);
+    psMetadataAddS32 (header, PS_LIST_TAIL, "NDET_FRC", PS_META_REPLACE, "Number of Forced detections", nForced);
     return true;
 }
@@ -308,4 +315,5 @@
     psMetadataItemSupplement (&status, header, analysis, "NDET_EXT");
     psMetadataItemSupplement (&status, header, analysis, "NDET_CR");
+    psMetadataItemSupplement (&status, header, analysis, "NDET_FRC");
 
     psMetadataItemSupplement (&status, header, analysis, "PSPHOT.PSF.APRESID");
