Fixes #7010

<code>count_ops()</code> returns 0 for logic expressions because ( I think) the cases for the <code>expr</code> being a logic expression are not dealt with. statements calling <code>count_ops()</code> are already converted into legal SymPy functions.It is not the best way but <strong>I am learning so please  enlighten me</strong> on this issue so that i can come up with a proper fix.
 fixes the issue #7010.