Your verified code looks right, I think you should try using WebDriverWaitto wait until the divs element appears with a validated locator.
I suggest you try using By.cssSelector()to achieve the same as below: -
WebDriverWait wait = WebDriverWait(driver, 10);
int size = wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.cssSelector("div.parent > div:not(.GoTop)"))).size();
: - , , ExpectedCinditions.numberOfElementsToBeMoreThan , , : -
WebDriverWait wait = WebDriverWait(driver, 10);
int size = wait.until(ExpectedConditions.numberOfElementsToBeMoreThan(By.cssSelector("div.parent > div:not(.GoTop)"), 6)).size();