Index: trunk/ippToPsps/jython/scratchdb.py
===================================================================
--- trunk/ippToPsps/jython/scratchdb.py	(revision 33833)
+++ trunk/ippToPsps/jython/scratchdb.py	(revision 34104)
@@ -544,7 +544,29 @@
 
     '''
+    Gets a count of average filters (secfilt) in the DVO Photcodes table
+    '''
+    def getCountOfFiltersFromPhotcodesTable(self):
+
+        # 2 is hardwired -- convert to an enum (should probably read Ohana/src/libdvo/include/dvo.h defines
+        sql = "SELECT count(TYPE) FROM " + self.dvoPhotcodesTable + " WHERE TYPE = 2"
+
+        filterCount = 0
+        try:
+            rs = self.executeQuery(sql)
+            row = 1
+            while (rs.next()):
+                filterCount = rs.getString(1)
+            rs.close()
+        except:
+            self.logger.errorPair("Could not get filter count", sql )
+
+        return filterCount
+
+    '''
     Gets a list of filters ordered as thy are in the DVO Photcodes table, as this reflects the order they apper in the cps file
     '''
     def getOrderedListOfFiltersFromPhotcodesTable(self, interestedFilters):
+
+        sql = "SELECT count(TYPE) FROM " + self.dvoPhotcodesTable + " WHERE TYPE = 'sec'"
 
         sql = "SELECT NAME FROM " + self.dvoPhotcodesTable + " WHERE "
