Finding no. of numbers coprime to n from 1 to m