# Pyth, <s>43</s> <s>42</s> 44 bytes lsmf|!@<G5dq%T2}\od}hKvMc-ecd\:G\-eKc-rz0d\, Try it online: [Demonstration][1] I think I can still chop one or two bytes. ### Explanation lsmf|!@<G5dq%T2}\od}hKvMc-ecd\:G\-eKc-zd\, implicit: z = input string -zd remove all spaces from z c \, and split by "," m map each part d to: cd\: split d by ":" e and only use the last part (removes page number) - G remove all letters (removes odd/even) c \- split by "-" vM and evaluate all (one or two) numbers K and store the result in K }hK eK create the list [K[0], K[0]+1, ..., K[-1]] f filter for numbers T in this list, which satisfy: @<G5d the intersection of "abcde" and d ! is empty (no odd/even in d) | or %T2 T mod 2 q equals }\od "o" in d s combine all the lists l print the length [1]: https://pyth.herokuapp.com/?code=lsmf%7C!%40%3CG5dq%25T2%7D%5Cod%7DhKvMc-ecd%5C%3AG%5C-eKc-rzZd%5C%2C&input=pg.+546%3A+17-19%2C+22%2C+26%2C+pg.+548%3A+35-67+odd%2C+79%2C+80-86+even&debug=0