HI

Try with this sample example

To count the number of X's in a single cell:
=len(a1)-len(substitute(a1,"X",""))

To count the number of X's or x's (upper or lower) in a single cell:
=len(a1)-len(substitute(upper(a1),"X",""))

To count the number of X's in a contiguous range:
=sumproduct(len(a1:a10)-len(substitute(a1:a10,"X","")))

To count the number of X's or x's in a contigous range:
=sumproduct(len(a1:a10)-len(substitute(upper(a1:a10),"X","")))

refer the link for more examples

http://support.microsoft.com/kb/214153
http://support.microsoft.com/kb/187667