Count frequent n-gram from big data with limited memory.