I am trying to count the total number of values of a specific type in a table that has multiple types of object using a generic function. I am using PHP Data Objects (PDO) a