Well done Soh Yong Sheng of Raffles Institution, Singapore. The houses are evenly spaced around a square and numbers 17 and 59 are opposite each other. The number of house must be a multiple of 4 as there are the same number on each side of the square and so the smallest possible is 60 with 15 on each side. This works with 17 and 59 one house along from the corner.
For the biggest number of houses, if 17 and 59 are on the corners of the square, there are 41 houses between them, so the largest possible number is 164.
Thanks to Neil and Guy Houlsby for pointing out our previous error and suggesting a variation to the question.
If the numbering starts from the corner and there are 17 + x houses on the first side then, by solving the equation 17 + 3x = 41, we find that there are 25 houses on each side and altogether 100 houses around the square.