This is the whole point of topological invariants; to determine the surface states(the states that their wave function is localised on the surface of the crystal).
So instead of explicitly calculating these states for finite crystal one can use a trick.
This is called bulk-boundary correspondence, even if your crystal is finite you assume that it is infinite, and calculate the Chern number(for even dimension) or winding number (for odd dimension).
Then those number will give you an information of the surface states of your finite crystal.
This is bulk-boundary correspondence, the information of the finite crystal can be obtained from the infinite crystal.