05AB1E, 11 8 bytes
LDpÈÏg<Õ
This might be non competing - I can't find out when 05AB1E was made.
How it works
L # this gets us the list of numbers [1 .. a]
D # duplicates this list
p # applies isPrime to each element of the list, vectorised.
È # is the element even? (does 05AB1E not have a logical not?)
Ï # push elements of the first list where the same index in the
# second list is 1
g< # finds the length and subtracts 1 (as the list contains 1)
# this is the not pi function
Õ # euler totient function