Turtle and Observer Command

count-patches-with [list of commands]

Returns the number of patches whose [list of commands] is true.

Examples:
count-patches-with [(distance 0 0) < 5] returns the number of patches inside a circle of radius 5 centered at the origin.

Related commands: