Adding agent count method for working out number of neighbours