# [Haskell], 33 bytes

<!-- language-all: lang-hs -->

 (a#b)x=sum[1|0<-mod<$>[a..b]<*>x]

[Try it online!][TIO-k3obt2tg]

Explanation:

```
(a#b)x --take two values a and b and the list x
 [a..b] --generate the range a, a+1, ... , b
 mod<$>[a..b] --partially apply "mod" to each entry of the list
 mod<$>[a..b]<*>x --apply the partially applied functions to all values of the list x
 [1|0<-mod<$>[a..b]<*>x] --generate a new list for every zero in the resulting list
(a#b)x=sum[1|0<-mod<$>[a..b]<*>x] --sum it all up
```

[Haskell]: https://www.haskell.org/
[TIO-k3obt2tg]: https://tio.run/##y0gszk7Nyfn/XyNROUmzwra4NDfasMbARjc3P8VGxS46UU8vKdZGy64i9n9uYmaegq1CQVFmXomCioKGoamyoYVmtJGOiY5x7H8A "Haskell – Try It Online"