Optimise the algorithm for counting number of addresses and update README.md