Skip to main content
5 of 7
added 115 characters in body
Jakube
  • 21.9k
  • 3
  • 27
  • 108

Pyth, 43 42 44 bytes

lsmf|!@<G5dq%T2}\od}hKvMc-ecd\:G\-eKc-rzZd\,

Try it online: Demonstration

I think I can still chop one or two bytes.

Explanation

lsmf|!@<G5dq%T2}\od}hKvMc-ecd\:G\-eKc-rzZd\,  implicit: z = input string
                                      rzZ     convert z to lower-case
                                     -   d    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      
                            
Jakube
  • 21.9k
  • 3
  • 27
  • 108