How often does the Unruh–DeWitt detector click? Regularization by a spatial profile