Thread pitch gauge