What is the best algorithm for finding the number of integers divisible by X?

I can easily do a:

```
for(num=1;num<maxRange;num++) {
int result = 0;
if(num%Y==0) {
result++;
}
}
```

but what if the maxRange is a really huge number (say a 9 or 10 digit number)?

I need something which is faster than the algorithm above.