I think the exception is caused because you used the keyword Count.
Now when you use the filter function, in the background it's actually SQL code running. So count being a keyword in SQL is misinterpreted here.
You can either specify it as a column by using $ sign
.filter($"count >= 1000")
Alternatively, you can use the rename function also
.filter("x >= 1000")
Hope this helps!!
If you need to learn more about Scala, It's recommended to join Scala Certification course today.