Script - COUNT of tasks due TODAY

Is there an available script or is it possible to do so, to have a script write into a CSV file the COUNT of tasks which are due TODAY (for example)?

Thanks,

Orlando