This is a difficult problem for Excel. The formula you showed first counts the number of cells that have two characters (any two characters, not matching characters), then gives the sum of that count. That is probably why you get a weird number.
I could not figure out how to do this with numbers. I had to add a helper column to convert the numbers to text. Then I used this formula:
Formula:
=SUM(COUNTIF(G:G,{"*00*","*11*","*22*","*33*","*44*","*55*","*66*","*77*","*88*","*99*"}))
See attached.
Bookmarks