Checks a string for equal amounts of Y and X