Fixed segfault for rangelist count