At some point during my tenure at the Peles National Museum, I had calculated that over 7 million tourists had paid to get in since the museum opened in 1990. During that time, Apple was running an ad counting the number of times iTunes songs had been downloaded. It was done using huge, Airport-type lettering. At first, I took the design and adapted it for a simple print-ad which gained traction among the museum’s fans and visitors.
In the coming weeks, I plotted a way to make the letter… move and keep counting. Taking into consideration the number of times people actually visit the castle proved to be impossible… but I did have statistics by my side. Roughly 300.000 people visit the museum each year. I took that as a baseline number and kept going with it.
Of course, no Adobe Flash or anything like that was on the table. This had to be in-browser jQuery only. The script wasn’t difficult, as I had some help from Chris Nanney who had already made the lettering and part of the code.
The trick now was to make sure the counter knows at what number it should start counting. Sure, you can tell it “start from 7.000.000” but you will need to update it regularly. The script can add numbers after the browser loads the script but it doesn’t save them anywhere. No cookies, no server-side SQL, no browser-side data. To get around this, I found an ingenious solution: UNIX time. Make the counter script calculate the exact 1990 UNIX time the museum openend and add 300.000 per 365 days minus current time. Using the current UNIX time, which is easily accessible, the script will therefore always show the EXACT and CORRECT number of visitors the moment the script is loaded.
Muzeul National Peles
The actual counter.