Make count_ops() work with logic operations by creating a binary tree. Bug was that Logic functions are not the instance of sympy.core.expr.Expr due to which logic operation were actually skipping to "else" case.
Fixes #7010
Added tests of the logic functions for count_ops() function.
Fixed a test case of Xor(x,y) = 2*AND + OR
Fixed the test case for Nand(x,y).count_ops(visual=True) = OR and Nor(x,y).count_ops(visual=True) = AND
Removed the obsolete test case which was addressing the bug.
Included the case of logic function in the "else" case.
removed the XXX comment to report bug.
Removed the case for logic functions because it was contradicting with every other function's ops which is Basic but not isinstance(expr,Expr)
Final commit, added the logic function to be counted in  count_ops()
remove the else condition and added the is.Boolean condition to general Basic instances.
Removed redundant tests count_ops(Basic()) = S.zero
Removed trailing whitespaces, will always check them first.
Added the cases to handle the exception of True and False, who were behaving as logic function.
Fixed the bug.
Merge branch 'master' of https://github.com/sympy/sympy
Fix the bug due to which `Basic()` was counted as an operation and used a better algo for parsing args.
Added more tests which also include some complex ones.
removed extra spaces
removed ``true`` and ``false`` and used ``not a.args is ()`` instead as suggested by aaron.
Replace "is" with "==" to check the conditions.