# Get count after dividided by certain numbers

Hi

I am able to print the numbers using (1 to 100).filter(i => i % 3 != 0 || i % 5 != 0 || i % 2 != 0)syntax. But at the same time I want to get the count of those numbers.

(1 to 100).filter(i => i % 3 != 0 || i % 5 != 0 || i % 2 != 0) && i.length)
But I am not get the count.
Could some one help how to get count.

Regards,
Kumar

I think someone has said this - why are you asking these questions here? Anyway, the count is:
`(1 to 100).filter(i => i % 3 != 0 || i % 5 != 0 || i % 2 != 0).length`

regards,
Siddhartha

Thanks sidhartha. I am not sure who asked. I am learning scala.
I am new to this programming language.
This is not a place for such a discussion, but this seems a peculiar way to learn scala (or anything else). Where does this collection of problems come from? Surely the same source has some explanations and examples. There is a clear mismatch in the level of the questions you ask (reasonably advanced) and the level of mistakes you make (like `i.length`, where `i` is not in scope and is an element of the list, not a list so cannot have a length).