title: summary() of transactions is wrong for itemMatrix object
body: <p>I am trying to do some market basket analysis using the <code>arules</code> package, but when I use the <code>summary()</code> function on an <code>itemMatrix</code> object to check which are the most frequent items, the numbers do not add up.
  If I do:</p>
  
  <pre><code>library(arules)
  x &lt;- read.transactions("Supermarket2014-15.csv")
  summary(x)
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>transactions as itemMatrix in sparse format with
   5001 rows (elements/itemsets/transactions) and
   997 columns (items) and a density of 0.003557162 
  
  most frequent items:    
  45      28      42      35      22 (Other) 
  503     462     444     440     413   15474 
  </code></pre>
  
  <p>But if I check with a <code>for</code> loop, or even in Excel, the count for the product 45 is 513 and not 503. The same for 28, which should be 499, and so on.
  The odd thing is if I sum up all the totals <code>(15474+413+440+444+462+503)</code> I get the correct number for the total of transacted products.</p>
  
  <p>The data has several <code>NA</code> values and products are factors.</p>
  
  <p><img src="https://i.stack.imgur.com/8PTyX.png" alt="str(x)"></p>
  
  <p>And here is the raw data (Day ranges from 1 to 28, Product ranges from 1 to 50):</p>
  
  <p><img src="https://i.stack.imgur.com/7BIhN.png" alt="Raw Data"></p>