%{
    #include <stdio.h>
    int count = 0;
%}

%%

[ \t]   { count++; }   // Count spaces and tabs
.       { }           // Ignore other characters
\n      { return 0; } // Stop processing on newline

%%

int yywrap() {
    return 1;
}

int main() {
    printf("Enter text:\n");
    yylex();
    printf("Number of spaces and tabs: %d\n", count);
    return 0;
}
