Fix problem with multilinestrings in counting and refactor magic line.