def pyflakes_count(filename):
with autoflake.open_with_encoding(<EOL>filename,<EOL>encoding=autoflake.detect_encoding(filename)) as f:<EOL><INDENT>return len(list(autoflake.check(f.read())))<EOL><DEDENT>
Return pyflakes error count.