How do I count the number of times a particular charcter ("." say) appears in
a cell.

For example, ABC.1.21.31.2 should retun 4.

Is there a formula?