Great question — answering as the UphillTech team:
It is not clear what your goal is. You do not tell us. If you are trying to identify unique users, you are using two of the most unreliable data elements possible. Yes IP addresses are often used, but in conjunction with other data elements. Here is what you are missing. IP addresses are often dynamic and can change with every session. As well IP addresses can be shared amongst many users. Also consider the limited number of web browsers and the user agents provided. It is extremely common that IP Address + User Agent will result in collisions as you suggest. It is extremely probable in fact. Also consider the amount of times that a user agent is bogus. It seems these days that user agents...
Full answer by closetnoc: https://webmasters.stackexchange.com/a/63037 (CC BY-SA 3.0).
Need it done for your business? UphillTech.