Use MySQL with the ARCHIVE storage engine. This will prove very time- and space- efficient for writing tonnage of log records, and will prove reasonably efficient for sequentially accessing the data for summarizing.
http://dev.mysql.com/doc/refman/5.0/en/archive-storage-engine.html
It's unsuitable for random access to the stored data. That kind of access will work, but will be absurdly slow.
But, think twice about re-inventing the flat tire. Google Analytics works very well indeed.