Ever since the European Union implemented the General Data Privacy Rule, the process of tracking daily unique visitors became complicated because of compliance guidelines. Counting unique visitors was something that we took for granted, and website administrators pretty much had free rein in terms of gathering analytics for their projects. The amount of information that used to be permissible for collection and analysis would these days be a clear violation of GDPR compliance, which means that you have to be careful with your tracking.
Information gathered in web server logs is not sufficient for analytics and business intelligence; what you want to use is a GDPR-compliant solution that can track only those unique visitors who agreed to certain cookies. There are a couple of ways you can go about this: becoming a subject matter expert in data privacy laws or use an analytics service that already offers privacy protection.
Aside from refusing to offer products and services in EU countries, the best way to get quality analytics these days is through services such as GoAccess or Plausible. These services can be secured by means of monthly subscriptions, and they provide actionable analytics that are in line with GDPR; moreover, they also offer website audits to ensure that your websites are not running afoul of the law.
Something else to keep in mind is that using Google Analytics will not automatically provide the level of GDPR compliance you may be looking for. If you are concerned about visitor privacy, you may want to evaluate cookie-free services such as Plausible. Finally, you may want to keep an eye on amendments to the California Consumer Privacy Act (CCPA), which may eventually become more stringent than GDPR. For more information click here https://www.reddit.com/r/web_design/comments/gcobad/so_i_want_to_count_number_of_unique_visits_to_my/.