I don't really understand what you want.

But this will count all occurrances of 123 in the range A1 to A20.

=SUMPRODUCT(--(ISNUMBER(SEARCH(123,A$1:A$20))))