Q:

Why do count(1), count(column) and count(*) have the same cost?

Why do the three queries have the same cost? I'm thinking at least one should be faster. Otherwise, it would be alright to just use the keyword COUNT() instead of COUNT(parameter).
For example, here's a sample implementation of COUNT() that doesn't depend on the parameter:
while(!end of table){
    while(!end of record){
        read byte;
    }
    add 1 on a count register;
}

Query 1:
select column, COUNT(1) 
from table
group by column

Query 2:
select column, COUNT(column) 
from table
group by column

Query 3:
select column, COUNT(*) 
from table
group by column

A:

Strictly speaking, they don't have the same cost.  count(1) and count(*) should be optimized to be the same thing.  count(<column>) needs to compare the column value to NULL, incurring a slight overhead.
The reason they are basically the same is twofold.  First, the process of running a query consists of two phases:  compilation/optimization and execution.  The SQL compiler/optimizer is smart enough to know that count(1) and count(*) are the same thing (at least for most databases).
The second reason is because the time for a query is typically dominated by the I/O time for fetching records from a table -- particularly for simple queries.  So the overhead of comparing a column value to NULL is negligible compared to everything else the execution engine has to do.

