1) Yes, You can use word count of specific word in the input file; Please follow the details below:

As an example, the following code can be used which sets "Tree" as the word to be searched:

//Create a new configuration
Configuration conf = new Configuration();
//Set the work to be searched
conf.set("wordToSearch", "Tree");
//create the job
Job job = new Job(conf);

Then, in your mapper/reducer class you can get wordToSearch (i.e., "Tree" in this example) using the following:

//Create a new configuration
Configuration conf = context.getConfiguration();
//retrieve the wordToSearch variable
String wordToSearch = conf.get("wordToSearch");

2) Yes,You can  use wordcount command by using 2 input file and getting the result in 1 output file

As for example you can try the following command:

hadoop jar test.jar /user/in.txt /user/sample.txt /user/out

3) For deleting the the output folder Please run the command given below

hadoop fs -rm -r /user/out

I hope this will resolve the issue

Please let me know if you have any further issue regarding this

Feel free to contact us in case you have any query.