public int countEntries(String name, boolean isXML){
    	int count=0;
    	if (!isXML) {
        	try{
        		FileReader fr = new FileReader(name);
        		BufferedReader br = new BufferedReader(fr);
        		StreamTokenizer st = new StreamTokenizer(br);
        		st.whitespaceChars(',', ',');
        		while(st.nextToken() != StreamTokenizer.TT_EOF) {
        			if(st.ttype==StreamTokenizer.TT_WORD)
        				if(st.sval.equals("entry")){
        					count++;
        				}
        		}
        		fr.close();    		
        	}catch(Exception e) {
        		System.out.println("Exception: " + e);
        	}
    	} else {
    	    
    	}
    	return count;    	
    }