#include <stdio.h>

int main() 
{
    long nc = 0;

    while (getchar() != EOF) {
        ++nc;
    }

    printf("count: %d\n", nc);
}

#include <stdio.h>

int main() 
{
    double nc = 0;

    for (nc = 0; getchar() != EOF; ++nc)
        ;

    printf("count: %f\n", nc);
}

Use dirty C tricks to make it smaller
Use dirty C tricks to make it smaller
