code: private Integer getNumberOfDocuments(List<File> inputFiles) throws ResourceInitializationException{
  	  String directory = (String) getConfigParameterValue(PARAM_INPUTDIR);
  	  String filename = directory+"/"+FILE_BASE_SEGMENTATION;
  	  for (File file : inputFiles) {
  		if (file.getAbsolutePath().equals(filename)){
  			try {
  				String line;
  				BufferedReader bf = new BufferedReader(new InputStreamReader(new FileInputStream(file), charset));
  				while ((line = bf.readLine()) != null){
  					String docName = (line.split("\t"))[0];
  					if (!(filenames.contains(docName))){
  						filenames.add(docName);
  					}
  				}
  				bf.close();
  			} catch (IOException e) {
  				throw new ResourceInitializationException(e);
  			}
  		}
  	  }	  
  	  int  docCounter = filenames.size();
  	  return docCounter;
    }
docs: count the number of different "documents" and save doc names in filenames
  @param inputFiles
  @return
  @throws ResourceInitializationException