I tried to add the script to remove characters from search string in this article:
https://knowledgebase.ajaxsearchpro.com/miscellaneous/other/replace-or-remove-characters-from-search-phrase
The removal seems to be working but if I hit enter with nothing in the search box I get this error on the Woocommerce shop page:
Warning: count(): Parameter must be an array or an object that implements Countable in /home/customer/www/dev.circuitassembly.com/public_html/wp-content/themes/divi-child/functions.php on line 40
at the top of the results page.
Can you please tell me what is wrong?