How to make AppleScript read the items of a variable that are numbers

You could try converting items in the list to the desired class, and ignore the ones that error:

set theNumbers to {}
set theList to {"123", "124", "abc", "125", "efgh", "126"}
repeat with anItem in theList
  try
    if contents of anItem is not "" then set the end of theNumbers to anItem as number
  on error errmess number errnum -- didn't convert
    log errmess
  end try
end repeat
return theNumbers