I can give some extra info for this error... I had the same upgrading from 1.3.7 to 1.3.9.... last 10 dates were all today and same numbers...
I looked into the SQL table (in PHPMySQL )called 'counter_history'... It showed over 100 entries with a date for each day over the past 10 days since I have done the upgrade....
Clearly it should not have duplicates and I could see the none of the 3 fields was indexed... I tried to index the field, but obviously would not let me because there were already some fields in the database with duplicate entries... I went through the table and removed all them duplicates manually.. Then I placed a primary index on the 'startdate' field... Went and did some test on the site... and now it works...
It seems that when there was no primary index on the startdate field, if a visitor visited the site, instead of increasing the numbers for todays date, it was adding extra rows of data... When the primary index was added, that CANNOT happen any more and therefore increses the existing number by 1...
I dunno, but was the previous versions not indexed, and, did the upgrade fail to index the field because of the already duplicated data..?? I dunno, but, I know how I fixed it..