Modified code for counting gaps
- fixed bug at counting
- compare the number of gaps in two sequences