Initial work on stats counter, doesn't use any vecotirized stuff or anything nice but it starts to work :)

Working* code :)