Refactor -countForSegmentAtIndex: