Thank you in advance!
John
John, it looks as if some of the values the long IF formula is entering in the cells are text instead of numbers. Since the COUNTIF only works with numbers, it won't recognize a text "3" as a number and count it.
Jim is correct, try removing the quotes around your resulting numbers (1, 3, 1, 2)
The suggestion to remove the quote around the numbers worked. Thank you very much for the assistance!