If Statement executes regardless of conditions being met or not

When I write an if Statement, and I clearly know that the conditions I have set within that statement are not met and thus the code in this if statement should not be executed. Katalon Studio is disregarding the conditions and still executing the code within. Can Someone help, please? Am I doing something wrong?
Here is my case:
WebDriver driver = DriverFactory.getWebDriver()
List profilesList = driver.findElements(By.xpath(’//a[@class=“tour__profile-name”]’))

if(profilesList.size() > 2) {
WebUI.click(findTestObject(‘Object Repository/CTCA/People/a_Third Profile Name’)
WebUI.verifyElementText(findTestObject(‘Object Repository/CTCA/People/Profile/div_Account Name under the traveler name’), ‘Billionaires’)
WebUI.click(findTestObject(‘Object Repository/CTCA/People/Profile/div_Back’))
}

*** profilesList.size() = 2

How about adding a confirmation statement to ensure your list size is 2.

List profilesList = driver.findElements(By.xpath('//a[@class="tour__profile-name"]'))

WebUI.comment(' list size is ' + profilesList.size().toString() ) 

if (profilesList.size() > 2) {

I have a println(profilesList.size()) in place, though I didn’t mention it in the post. But yes, the list size is 2

Okay. I know you know the state of your TC, but can I make another suggestion (I’m just confirming everything you know):

List profilesList = driver.findElements(By.xpath('//a[@class="tour__profile-name"]'))

WebUI.comment(' list size is ' + profilesList.size().toString() ) 

if (profilesList.size() > 2) {
    WebUI.comment(' we are here! we are here!' ) 
    WebUI.delay(127)

    WebUI.click(findTestObject('CTCA/People/a_Third Profile Name')