moved getStartEndcount to Series.py