Perhaps the expression: distance(x1, y1, x2, y2)
enter the X,Y of the tower, and the x, y of the enemy, and it will return the number of pixels between.
Edit: and do a PickedCount (with all picked) to see how many towers there are, and don't create one if it's more than your maximum.
Tower.PickedCount < 20