title: Rails Syntax Error with `Count`
body: <p>I have a basic to do app and am trying to show the most recent 4 lists on the homepage, then link to "See X more..." at the bottom.  The logic worked perfectly if there were 5 or more lists, but when there were 4 or fewer I would get "See 0 more..." or "See -3 more..." which obviously isn't right, so I added an if statement with the same basic components, but got this very complex syntax error:</p>
  
  <pre><code>syntax error, unexpected ')', expecting keyword_then or ';' or '\n'
  ...end=( if @my_items.count &gt;= 5 );@output_buffer.safe_append='
  ...                               ^
  /Users/.../app/views/home/index.html.erb:50: syntax error, unexpected keyword_end, expecting ')'
  '.freeze;           end 
                         ^
  /Users/.../app/views/home/index.html.erb:103: syntax error, unexpected keyword_else, expecting ')'
  '.freeze; else 
                ^
  /Users/.../app/views/home/index.html.erb:122: syntax error, unexpected keyword_end, expecting ')'
  '.freeze; end 
               ^
  /Users/.../app/views/home/index.html.erb:125: syntax error, unexpected keyword_ensure, expecting ')'
  /Users/.../app/views/home/index.html.erb:127: syntax error, unexpected keyword_end, expecting ')'
  </code></pre>
  
  <p>Here's the code, with the problematic line indicated:</p>
  
  <pre><code>    &lt;% @top_items.each do |item| %&gt;
        &lt;% if item.user_id == current_user.id %&gt;
        &lt;p&gt;☐ &lt;%= item.name %&gt;&lt;/p&gt;
        &lt;% end %&gt;
      &lt;% end %&gt;
      &lt;p class="text-center"&gt;
        &lt;%= if @my_items.count &gt;= 5 %&gt;   &lt;&lt;&lt;&lt;&lt;&lt;THIS IS THE PROBLEM LINE
          &lt;%= link_to lists_path do %&gt;See &lt;%= @my_items.count.count - 4 %&gt; More...&lt;% end %&gt;
        &lt;% end %&gt;
      &lt;/p&gt;
  </code></pre>
  
  <p>Just to clarify, if I comment out the problem line and it's corresponding `&lt;% end %> the page shows error free. Anyone understand what is going wrong here?</p>