PythonfromRuslan's Blog2 weeks ago5 to 18: Why Your Count Might Be Off by OneCounting includes both endpoints, hence the formula is b - a + 1.