Governing limits apply on SOQL also?

We talked about governing limits. Say I load 4 Million records in SFDC through data loader. Now I want to count that the 4 M records have indeed been loaded. I need to write a Count statement in SOQL. Can I just write it or do I just do that in 1 statement or do I need to remember that only 50k records can be processed at a time.

Also say I want to write a count distinct values then would I be able to write it all in in statement or do I need to do the processing on 50k at a time?