N-gram match count using MapReduce