For a simple one liner, it's often too much work to start up sqlplus, logon, type in the SQL statement, then exit. It may also be too trivial to save the SQL statement to a file that you then call from sqlplus, e.g.
C:\>sqlplus user/pass @myfile.sql
.To do it all in one line on the command prompt, echo the statement into sqlplus:
echo select count(*) from mytable; | sqlplus user/pass
This technique would probably also work on a Unix box, but I don't have an Oracle db installed on a Unix box to test it out.