#Retina, 36 bytes
.+ $*1:$&$* (?=.+:)(?!(11+)\1*:\1+$) Explanation
There are two stages (commands).
First stage
.+ $*1:$&$* It is a simple regex substitution, converting the input to that many ones, followed by a colon, followed by that many ones again.
For example, 5 would be converted to 11111:11111.
Second stage
(?=.+:)(?!(11+)\1*:\1+$) This regex tries to match the positions which satisfy the condition (co-prime with input), and then return the number of matches.