code: private void createViewForCount(Map<String, MapReduce> views)
      {
          if (views.get(CouchDBConstants.COUNT) == null)
          {
              MapReduce mapr = new MapReduce();
              mapr.setMap("function(doc){" + "for(field in doc){if(field!=\"" + CouchDBConstants.ENTITYNAME
                      + "\"){var o = doc[field];emit(field+\"_\"+doc." + CouchDBConstants.ENTITYNAME + ", o);" + "}}"
                      + "emit(\"" + CouchDBConstants.ALL + "_\"+doc." + CouchDBConstants.ENTITYNAME + ", null);}");
              mapr.setReduce("function(keys, values){return values.length;}");
              views.put(CouchDBConstants.COUNT, mapr);
          }
      }
docs: Creates the view for count.
  
  @param views
  the views