5
Python 2, 44 bytes
f=lambda n,x=1:+(x>n)or(n%x<1)-f(n,x+2)/4<<2
This is almost the same as xsot's solution (which is based on Peter Taylor's solution), but saves 8 bytes by simplifying the way signs are handled.
Note that for a full program, we can save 2 bytes in the function without incurri...