    public static class MasteringHadoopCountersMap extends Mapper<LongWritable, Text, LongWritable, IntWritable> {
 private IntWritable countOfWords = new IntWritable(0); 
             @Override
             protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
 
                 StringTokenizer tokenizer = new StringTokenizer(value.toString());
                 int words = tokenizer.countTokens();
 if(words == 0) context.getCounter(WORDS_IN_LINE_COUNTER.ZERO_WORDS).increment(1);
                 if(words > 0 && words <= 5)
 context.getCounter(WORDS_IN_LINE_COUNTER.LESS_THAN_FIVE_WORDS).increment(1);
                 else
 context.getCounter(WORDS_IN_LINE_COUNTER.MORE_THAN_FIVE_WORDS).increment(1);
 countOfWords.set(words);
                 context.write(key, countOfWords);
             }
         }
 
 
