According to the eBay tech blog , it is unusual to store your counter values ββin the key itself. Therefore, in order to save the number of times, Bob, Ken and Jimmy entered the website, one line would look like this:
logins: [(0001_Bob,''), (0002_Bob, ''), ..., (0010_Ken, ''), (0012_Jimmy, ''), ...]
Please note that your keys will automatically sort themselves with the highest counter at the end, and this is close to constantly looking at the time.
Please note that each time your user logs in, a new column is created. You will need to track the amount of input in another line so that you have a quick search for the amount of input so far and what integer value your next key has:
login_count: [(Bob, 2), (Ken, 10), (Jimmy, 10), ...]
source share