Random distribution of topological defects in mesoscopic superconducting samples