Loop for input section of rename script
If you want to match by the same pattern as rename,
then it's probably best to use perl.
To be really pedantic and support filenames with embedded newlines,
you could use -print0 of find,
and then in perl split the output by \0 characters and filter with the grep function:

find . -maxdepth 1 -print0 | perl -ne "print scalar grep /$search/, split /\0/"


Putting in your script:

 while true; do
     echo "Please enter token to be replaced: "
     read -e -r search
     match=$(find . -maxdepth 1 -print0 | perl -ne "print scalar grep /$search/, split /\0/")
     if [ "${match}" -gt 0 ]; then
         echo "${match} file(s) found"
         break
     else
         echo "no matches found!"
         echo
     fi
 done