randint is trash! It is slower than randrange, lacks the step option that randrange has, and the upper bound is inclusive which is inconsistent with everything else in Python.
I feel like we've reached the point where weird, useless optimization videos are becoming trending. They contain advice you probably won't ever use or need, because it's presented in a context and scope where it isn't actually useful at all, and then the comments will argue back and forth about extreme black and white stances, neither of which is right, about how you 100% should never always do a certain generic thing they don't actually understand. I'm gonna go back to actually innovating.
Or, examine logs the http server already produces anyway and count the visitors from this data. Do this once in a while (dunno, once per day). And store the count into some nice database. Then create web page with nice graphs of visitors over time, per operating system, per web browser and similar stuff.