Try this...
Formula: copy to clipboard
=SUMPRODUCT(--(--TRIM(SUBSTITUTE($A$1:$A$8,"x",""))<=(--TRIM(SUBSTITUTE($A1,"x","")))))