Counting number of residences work