Fix/count overlap

continue to fix #324