Dick had heard that the streets in London were all paved with gold.
So Dick got safe to London, and was in such a hurry to see the fine street paved all over with gold that he did not even stay to thank the kind waggoner; but ran off as fast as his legs would carry him, through many of the streets, thinking every moment to come to those that were paved with gold; for Dick had seen a guinea three times in his own little village, and remembered what a deal of money it brought in change; so he thought he had nothing to do but to take up some little bits of the pavement, and should then have as much money as he could wish for.
This is from an English fairy tale. What's the meaning of "what a deal of money it brought in change"? Does it mean " what much money brought him in change"? If so, what does this "it" mean?