private int calculateAmountOfPages() {
        int amountOfModules = getModules().size();
        int modulesPerPage = getModulesPerPage();
        // if all pages are completely full
        if (amountOfModules % modulesPerPage == 0) {
            return amountOfModules / modulesPerPage;
        } else {
            // if the last page is not full, round up to the next page
            return amountOfModules / modulesPerPage + 1;
        }
    }
Calculates the amount of pages of modules (rendered as tiles).

@return amount of pages
@implNote Each page is filled up until there are as many tiles as {@code modulesPerPage}.
This is repeated until all modules are rendered as tiles.
workbenchfx-core/src/main/java/com/dlsc/workbenchfx/Workbench.java