Else Statement Never Functions As Expected
7&lt;count&lt;15 is interpreted as (7&lt;count)&lt;15.  7&lt;count will result in a false or true, which will be interpreted as 0 and 1 when later involved in the &lt; 15 part of the expression, which means 7&lt;count&lt;15 is always true.
What you're probably looking for is 7 &lt; count &amp;&amp; count &lt; 15.