Here is the script after some cleaning.
tell application "TextEdit"
activate
set p2d to path to desktop as text
set theFile to p2d & "fakeGreek.txt"
set theDoc to open file theFile
set MyDoc to text of theDoc
--set visible of window 1 to false --optional
set theParagraphs to paragraphs of MyDoc
set GreekCharacterSet to {"α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ό", "о", "π", "ρ", "ς", "Ύ", "φ", "χ", "ψ", "ω"}
set GreekYes to {} --Greek characters of the text go there
set GreekNo to {} --Non-Greek characters of the text go there
repeat with i from 1 to (count theParagraphs) --1st loop. Selects every paragraph of the text of the document.
set ParagraphCharacters to text items of paragraph i of MyDoc
repeat with item_ref in GreekCharacterSet --2nd loop. Compares every characters of GreekCharacterSet to every characters of selected paragraph of the text of the document
set itemref to item_ref as text
if itemref is in ParagraphCharacters then
repeat with j from 1 to (count ParagraphCharacters)
if itemref = item j of ParagraphCharacters then
set end of GreekYes to itemref
--set GreekCharactersCount to (count GreekYes)
else
set maybe to item j of ParagraphCharacters as text
if maybe is not in {" ", "(", ")", "-", "+", "=", "|", "{", "}", "°", "[", "]", "^", "/", "\\", "·", "$", "€", "‡", "±", "*", "<", ">", "≥", "≤", "≠", ":", ";", ".", ",", "⁄", "‹", "›", "—", "_", "?", "!", "«", "»", "", linefeed, "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"} then
if maybe is not in GreekNo then set end of GreekNo to maybe --contents of item j of ParagraphCharacters --GreekNo --variable which then is counted.
--set NonGreekCharactersCount to (count GreekNo)
end if
end if
end repeat
end if # contents of item_ref
end repeat
end repeat
end tell
{GreekYes, count GreekYes, linefeed, GreekNo, count GreekNo}