backport r67077 from the trunk: parser module now correctly validates relative imports
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index e33197e..e49e600 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -1804,10 +1804,10 @@
 count_from_dots(node *tree)
 {
         int i;
-        for (i = 0; i < NCH(tree); i++)
+        for (i = 1; i < NCH(tree); i++)
 		if (TYPE(CHILD(tree, i)) != DOT)
 			break;
-        return i;
+        return i-1;
 }
 
 /* 'from' ('.'* dotted_name | '.') 'import' ('*' | '(' import_as_names ')' |