private void countUnshelved() throws SQLException
   {
      Collection<Record> records = GetRecords.create().getAllRecords();
      Map<String, Integer> formatCount = new TreeMap<String, Integer>();
      for (Record r : records)
         if (r.getShelfPos() <= 0 && r.getSoldPrice() < 0)
            if (formatCount.containsKey(r.getFormat().getBaseFormat()))
               formatCount.put(r.getFormat().getBaseFormat(),
                     formatCount.get(r.getFormat().getBaseFormat()) + 1);
            else
               formatCount.put(r.getFormat().getBaseFormat(), 1);
      for (Entry<String, Integer> entry : formatCount.entrySet())
         System.out.println(entry.getKey() + " = " + entry.getValue());

   }