Fix example spark sql program ...

This fixes an example spark sql program which failed at the getInt() call.
getInt() was called on a COUNT query whose output datatype is of type Long and casting a Long to Int is an illegal operation

In this commit:
* use getLong(0) instead of getInt(0)
* Fix typos in comments
* add call parens to collect() call for consistency