Add digram & trigram count check

code maybe a litter messy ^_^