             if case let minorEdits?? = editCounts[.minor] {
                 counts.append(Count(title: WMFLocalizedString("page-history-minor-edits", value: "minor edits", comment: "Text for view that shows many edits were marked as minor edits"), image: UIImage(named: "reverted")!, count: minorEdits))
             }
-            updateLayout(60, countOfColumns: counts.count)
+            updateLayout(countOfColumns: counts.count)
             delegate?.didDetermineFilterCountsAvailability(!counts.isEmpty, viewController: self)
         }
     }

        let Count = counts[indexPath.item]
        cell.configure(with: Count.title, image: Count.image, imageText: displayCount(Count.count), isRightSeparatorHidden: indexPath.item == counts.count - 1)
        cell.apply(theme: theme)
        return cell
    }
}

    override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
        super.viewWillTransition(to: size, with: coordinator)
        coordinator.animate(alongsideTransition: { _ in
            self.collectionView.collectionViewLayout.invalidateLayout()
            self.updateLayout()
        })
    }

    private func updateLayout(countOfColumns: Int = 4) {
        flowLayout.scrollDirection = .horizontal
        flowLayout.minimumInteritemSpacing = 0
        flowLayout.sectionInset = .zero
        flowLayout.minimumLineSpacing = 0
        let countOfColumns = CGFloat(countOfColumns)
        let availableWidth = collectionView.bounds.width - flowLayout.minimumInteritemSpacing * (countOfColumns - 1) - collectionView.contentInset.left - collectionView.contentInset.right - flowLayout.sectionInset.left - flowLayout.sectionInset.right
        let dimension = floor(availableWidth / countOfColumns)
        flowLayout.estimatedItemSize = CGSize(width: dimension, height: collectionViewHeightConstraint.constant)
    }

    private var flowLayout: UICollectionViewFlowLayout {
        return collectionView.collectionViewLayout as! UICollectionViewFlowLayout
    }
}

