Here is my code:
check my simple codes below url. https://github.com/JJ81/column-count maybe you can have what you want.